Skip to content

Merge pull request #11 from ekala-project/ci-setup #15

Merge pull request #11 from ekala-project/ci-setup

Merge pull request #11 from ekala-project/ci-setup #15

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Nix
uses: nixbuild/nix-quick-install-action@v28
with:
github_access_token: ${{ secrets.PAT }}
nix_conf: |
netrc-file = /home/runner/.netrc
- uses: bcomnes/netrc-creds@v3
with:
creds: |
[
{
"machine": "github.com",
"login": "git",
"password": "${{ secrets.PAT }}"
},
{
"machine": "api.github.com",
"login": "git",
"password": "${{ secrets.PAT }}"
}
]
- name: Setup Cache
uses: DeterminateSystems/magic-nix-cache-action@v8
- name: Eval Devshell
run: nix-instantiate shell.nix --add-root shell
- name: Check Format
run: nix-shell shell --command "treefmt --ci"
- name: Run Tests
run: nix-shell shell --command "cargo test --all"