Skip to content

Merge pull request #1523 from bsrunnels/alamo #647

Merge pull request #1523 from bsrunnels/alamo

Merge pull request #1523 from bsrunnels/alamo #647

---
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