-
Notifications
You must be signed in to change notification settings - Fork 41
33 lines (33 loc) · 1.26 KB
/
test-pfhub-package.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
---
name: Test PFHub Package
on: [push, pull_request]
jobs:
pfhub-nix-test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./_data/python-pfhub
steps:
- uses: actions/checkout@v2.3.4
- uses: cachix/install-nix-action@v14.1
with:
nix_path: nixpkgs=channel:nixos-unstable
name: pfhub
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
extraPullNames: nix-community
- 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-shell --pure --command "py.test --nbval-lax --cov-fail-under=100"
- run: nix-shell --pure --command "black --check setup.py pfhub"
- run: nix-shell --pure --command "pylint setup.py pfhub"
- run: nix-shell --pure --command "flake8 setup.py pfhub"
- run: nix-shell --pure --command "cd ../../results; make notebooks"
- run: nix-shell --pure --command "py.test --nbval-lax ../../results/benchmark*.ipynb"
- uses: actions/cache/save@v3
if: always()
with:
path: /run/user/${{ env.UID }}/http_cache.sqlite
key: ${{ runner.os}}-http_cache.sqlite