Manually setup cache

This commit is contained in:
Till Faelligen 2022-11-30 12:14:23 +01:00
parent 822edec9b8
commit d250f4796a
No known key found for this signature in database
GPG key ID: ACCDC9606D472758

View file

@ -81,13 +81,20 @@ jobs:
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
cache: true
- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go${{ matrix.go }}-unit-race-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go${{ matrix.go }}-unit-race-
- name: Set up gotestfmt
uses: gotesttools/gotestfmt-action@v2
with:
# Optional: pass GITHUB_TOKEN to avoid rate limiting.
token: ${{ secrets.GITHUB_TOKEN }}
- run: go test -short -json -v -coverpkg=./... -coverprofile=cover.out $(go list ./... | grep -v /cmd/dendrite*) 2>&1 | gotestfmt
- run: go test -race -short -json -v -coverpkg=./... -coverprofile=cover.out $(go list ./... | grep -v /cmd/dendrite*) 2>&1 | gotestfmt
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3