chore(deps): bump actions/cache from 4.0.1 to 4.0.2 #543
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Unit Tests | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
concurrency: | |
group: quamina-unit-tests-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
name: Unit Tests | |
strategy: | |
matrix: | |
go-version: ["1.19"] | |
platform: ["ubuntu-latest"] | |
type: ["Tests","Cover"] # run coverage as separate job w/out -race to avoid killing process | |
include: | |
- type: "Tests" | |
goflags: '-v -race -count=1 -json' | |
- type: "Cover" | |
goflags: "-v -count=1 -json" | |
coveropts: "-coverprofile=coverage.txt -covermode=atomic" | |
runs-on: ${{ matrix.platform }} | |
timeout-minutes: 20 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 | |
- name: Set up Go ${{ matrix.go-version }} | |
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 | |
with: | |
go-version: ${{ matrix.go-version }} | |
id: go | |
- name: Restore Go cache | |
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 | |
with: | |
path: | | |
~/.cache/go-build | |
~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum', 'testdata/**') }} | |
restore-keys: | | |
${{ runner.os }}-go-${{ matrix.go-version }}- | |
- name: Install tparse | |
run: go install github.com/mfridman/tparse@latest | |
- name: Check for .codecov.yaml | |
id: codecov-enabled | |
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 | |
with: | |
files: .codecov.yaml | |
- name: Test | |
env: | |
COVER_OPTS: ${{ matrix.coveropts }} | |
GOFLAGS: ${{ matrix.goflags }} | |
run: go test $COVER_OPTS ./... | tparse -all -notests -format markdown >> $GITHUB_STEP_SUMMARY | |
- if: steps.codecov-enabled.outputs.files_exists == 'true' | |
name: Upload Codecov Report | |
uses: codecov/codecov-action@54bcd8715eee62d40e33596ef5e8f0f48dbbccab | |
- name: Verify git clean | |
shell: bash | |
run: | | |
if [[ -z "$(git status --porcelain)" ]]; then | |
echo "${{ github.repository }} up to date." | |
else | |
echo "${{ github.repository }} is dirty." | |
echo "::error:: $(git status)" | |
exit 1 | |
fi |