Skip to content

Commit

Permalink
add nix test case
Browse files Browse the repository at this point in the history
  • Loading branch information
wd15 committed Nov 26, 2024
1 parent bf5f74b commit 829d963
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Test Nix
on: [push, pull_request]
jobs:
pfhub-nix-test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./ro-crate-examples
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 --cov-fail-under=100"
- run: nix develop --command bash -c "black --check rocrate_cli"
- run: nix develop --command bash -c "pylint rocrate_cli"
- run: nix develop --command bash -c "flake8 rocrate_cli"
- run: nix develop --command bash -c "pfhub test"
- 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 829d963

Please sign in to comment.