Update cachix/install-nix-action action to v27 #143
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: "Tests" | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
self-test: | |
strategy: | |
matrix: | |
# macos has weird SIGBUS errors in github that I cannot reproduce on aarch64-darwin... | |
#os: [ ubuntu-latest, macos-latest ] | |
os: [ ubuntu-latest ] | |
nom: [ "", "--no-nom"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# Nix Flakes doesn't work on shallow clones | |
fetch-depth: 0 | |
- uses: cachix/install-nix-action@v27 | |
with: | |
github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
extra_nix_config: | | |
accept-flake-config = true | |
- name: Self-test | |
run: nix shell --inputs-from . nixpkgs#coreutils -c timeout --verbose 600 nix run . -- ${{ matrix.nom }} | |
- name: Self-test (should fail) | |
run: | | |
if nix shell --inputs-from . nixpkgs#coreutils -c timeout --verbose 600 nix run . -- --flake .#legacyPackages ${{ matrix.nom }}; then | |
echo "expect this to fail" | |
false | |
fi | |
tests: | |
strategy: | |
matrix: | |
#os: [ ubuntu-latest, macos-latest ] | |
os: [ ubuntu-latest ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# Nix Flakes doesn't work on shallow clones | |
fetch-depth: 0 | |
- uses: cachix/install-nix-action@v27 | |
with: | |
github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
extra_nix_config: | | |
accept-flake-config = true | |
- name: Run tests | |
run: nix develop -c pytest ./tests |