Skip to content

Commit

Permalink
Add nix-community/cache-nix-action for integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
drklee3 committed Feb 1, 2024
1 parent 86e098f commit 1fd7052
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: '1.20'
go-version: "1.20"
check-latest: true
- uses: actions/checkout@v3
- uses: technote-space/[email protected]
Expand All @@ -47,7 +47,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: '1.20'
go-version: "1.20"
check-latest: true
- uses: actions/checkout@v3
- uses: technote-space/[email protected]
Expand All @@ -68,7 +68,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: '1.20'
go-version: "1.20"
check-latest: true
- uses: actions/checkout@v3
- uses: technote-space/[email protected]
Expand All @@ -87,18 +87,33 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v18
- uses: technote-space/[email protected]
with:
PATTERNS: |
**/**.sol
**/**.go
go.mod
go.sum
- uses: actions/setup-go@v3
with:
go-version: "1.20"
check-latest: true

- uses: nixbuild/nix-quick-install-action@v26
- name: Restore and cache Nix store
uses: nix-community/cache-nix-action@v5
with:
primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix') }}
# restore a cache by this prefix
restore-prefixes-first-match: nix-${{ runner.os }}-
# collect garbage until Nix store size (in bytes) is at most this number
# before trying to save a new cache
gc-max-store-size-linux: 1073741824

- name: Run integration tests
run: make run-integration-tests
if: env.GIT_DIFF
- name: 'Tar debug files'
- name: "Tar debug files"
if: failure()
run: tar cfz debug_files.tar.gz -C /tmp/pytest-of-runner .
- uses: actions/upload-artifact@v3
Expand Down

0 comments on commit 1fd7052

Please sign in to comment.