Skip to content

Commit

Permalink
update github ci to use flake
Browse files Browse the repository at this point in the history
  • Loading branch information
wd15 committed Jan 10, 2024
1 parent f146fe4 commit cb76051
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: nix
name: Test Nix
on: [push, pull_request]
jobs:
test:
Expand All @@ -11,12 +11,23 @@ jobs:
run:
working-directory: ./
steps:
- uses: actions/checkout@v2.3.4
- uses: cachix/install-nix-action@v14.1
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-unstable
name: fipy
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
extraPullNames: nix-community
- run: nix-shell --pure --command "python setup.py test"
- run: nix-shell --pure --command "py.test --nbval --sanitize-with examples/sanitize.cfg examples/index.ipynb"
- run: echo "UID=${UID}" >> $GITHUB_ENV
- uses: actions/cache/restore@v3
with:
path: /run/user/${{ env.UID }}/http_cache.sqlite
key: ${{ runner.os}}-http_cache.sqlite
- run: nix develop --command bash -c "python setup.py test"
- run: nix develop --command bash -c "py.test --nbval --sanitize-with examples/sanitize.cfg examples/index.ipynb"
- uses: actions/cache/save@v3
if: always()
with:
path: /run/user/${{ env.UID }}/http_cache.sqlite
key: ${{ runner.os}}-http_cache.sqlite

0 comments on commit cb76051

Please sign in to comment.