ci: run on push to master as well #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- 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 = ${{ runner.home }}/.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 }}" | |
} | |
] | |
- run: nix config show | grep netrc && cat ${{ runner.home }}/.netrc | |
- name: Setup Cache | |
uses: DeterminateSystems/magic-nix-cache-action@v8 | |
- name: Enter Devshell | |
run: . <(nix print-dev-env "$(nix-instantiate shell.nix)") | |
- name: Check Format | |
run: treefmt --ci | |
- name: Run Tests | |
run: cargo test --all |