⬆️ Update 👷 GitHub Action codecov/codecov-action to v5.0.2 (#127) #126
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: Tests | |
on: | |
push: | |
branches: main | |
workflow_call: | |
jobs: | |
test: | |
permissions: | |
id-token: write | |
checks: read | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Setup Go | |
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5 | |
with: | |
go-version-file: ${{github.workspace}}/go.mod | |
cache: true | |
- name: Setup gotestfmt | |
uses: gotesttools/gotestfmt-action@v2 | |
with: | |
token: ${{github.token}} | |
- name: Run Tests | |
run: >- | |
go test -v ./... | |
-json | |
-coverprofile coverage.out | |
-cover ${{github.workspace}} | |
2>&1 | gotestfmt | |
- name: Upload Code Coverage | |
uses: codecov/codecov-action@5c47607acb93fed5485fdbf7232e8a31425f672a # v5.0.2 | |
with: | |
fail_ci_if_error: true | |
directory: ${{github.workspace}} | |
files: coverage.out | |
use_oidc: true |