chore: bump nix and nixpkgs (#7) #35
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: Test | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- '**' | |
- '!**/README*' | |
- '!**/CONTRIBUTING*' | |
pull_request: | |
types: [opened, synchronize, reopened] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
all-tests: | |
name: Tests ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cachix/install-nix-action@v22 | |
with: | |
extra_nix_config: | | |
experimental-features = nix-command flakes | |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
substituters = https://cache.nixos.org | |
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= | |
max-jobs = auto | |
cores = 0 | |
substitute = true | |
builders-use-substitutes = true | |
fallback = true | |
connect-timeout = 5 | |
stalled-download-timeout = 90 | |
timeout = 0 | |
- name: Setup | |
run: | | |
echo "# ============================================================================ #" >&2; | |
{ printf ' bash version: '; bash --version|head -n1; } >&2; | |
{ printf ' nix version: '; nix --version; } >&2; | |
echo "# ---------------------------------------------------------------------------- #" >&2; | |
- name: Nix Flake Check | |
run: nix flake check | |
- name: Run Build | |
run: nix develop --no-update-lock-file --command make -j4 | |
- name: Run Tests | |
run: nix develop --no-update-lock-file --command make check -j4 | |
all-tests-success: | |
if: ${{ always() }} | |
runs-on: ubuntu-latest | |
name: Tests ( All Systems ) | |
needs: all-tests | |
steps: | |
- if: >- | |
${{ | |
contains( needs.*.result, 'failure' ) || | |
contains( needs.*.result, 'cancelled' ) | |
}} | |
run: exit 1 |