Skip to content

Commit cb76051

Browse files
committed
update github ci to use flake
1 parent f146fe4 commit cb76051

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

.github/workflows/nix.yml

+16-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: nix
2+
name: Test Nix
33
on: [push, pull_request]
44
jobs:
55
test:
@@ -11,12 +11,23 @@ jobs:
1111
run:
1212
working-directory: ./
1313
steps:
14-
- uses: actions/checkout@v2.3.4
15-
- uses: cachix/install-nix-action@v14.1
14+
- uses: actions/checkout@v3
15+
- uses: cachix/install-nix-action@v20
1616
with:
1717
nix_path: nixpkgs=channel:nixos-unstable
1818
name: fipy
1919
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
2020
extraPullNames: nix-community
21-
- run: nix-shell --pure --command "python setup.py test"
22-
- run: nix-shell --pure --command "py.test --nbval --sanitize-with examples/sanitize.cfg examples/index.ipynb"
21+
- run: echo "UID=${UID}" >> $GITHUB_ENV
22+
- uses: actions/cache/restore@v3
23+
with:
24+
path: /run/user/${{ env.UID }}/http_cache.sqlite
25+
key: ${{ runner.os}}-http_cache.sqlite
26+
- run: nix develop --command bash -c "python setup.py test"
27+
- run: nix develop --command bash -c "py.test --nbval --sanitize-with examples/sanitize.cfg examples/index.ipynb"
28+
- uses: actions/cache/save@v3
29+
if: always()
30+
with:
31+
path: /run/user/${{ env.UID }}/http_cache.sqlite
32+
key: ${{ runner.os}}-http_cache.sqlite
33+

0 commit comments

Comments
 (0)