Skip to content

PFHub CLI tool

PFHub CLI tool #613

---
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@v3
- uses: cachix/install-nix-action@v20
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 develop --command bash -c "py.test --nbval-lax --cov-fail-under=100"
- run: nix develop --command bash -c "black --check setup.py pfhub"
- run: nix develop --command bash -c "pylint setup.py pfhub"
- run: nix develop --command bash -c "flake8 setup.py pfhub"
- run: nix develop --command bash -c "cd ../../results; make notebooks"
- run: nix develop --command bash -c "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