Skip to content

Commit a62682e

Browse files
committed
Better staticcheck cache 2
Follow-up to #1287 ... let's see if we can get it right... Also run fuzz tests for just one minute, instead of five.
1 parent 87ee06c commit a62682e

2 files changed

Lines changed: 3 additions & 9 deletions

File tree

‎.github/workflows/staticcheck.yml‎

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,10 @@ jobs:
5555
exit $fail
5656
5757
# Store cache, only on master branch
58-
- name: 'delete existing cache'
59-
if: "github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'"
60-
env: {GH_TOKEN: '${{ secrets.GITHUB_TOKEN }}'}
61-
continue-on-error: true
62-
run: |
63-
gh extension install actions/gh-actions-cache
64-
gh actions-cache delete "${{ env.cache }}" --confirm
6558
- uses: 'actions/cache/save@v5'
59+
if: "github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'"
6660
with:
67-
key: '${{ env.cache }}'
61+
key: 'staticcheck'
6862
path: |
6963
${{ runner.temp }}/staticcheck
7064
/home/runner/.cache/go-build

‎.github/workflows/test.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
run: |
1717
set -eu
1818
f=($(grep -Eo '^func Fuzz[a-zA-Z0-9_]+' fuzz_test.go | cut -d' ' -f2))
19-
t=$(( 300 / ${#f[@]} ))s
19+
t=$(( 60 / ${#f[@]} ))s
2020
for ff in ${f[@]}; do
2121
echo go test -test.run=DontRunTests -fuzztime=$t -fuzz=$ff
2222
go test -test.run=DontRunTests -fuzztime=$t -fuzz=$ff

0 commit comments

Comments
 (0)