Skip to content

πŸ’š (Hopefully) fix codecov support #86

πŸ’š (Hopefully) fix codecov support

πŸ’š (Hopefully) fix codecov support #86

Workflow file for this run

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@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Setup Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # 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@84508663e988701840491b86de86b666e8a86bed # v4.3.0
with:
fail_ci_if_error: true
directory: ${{github.workspace}}
files: coverage.out
use_oidc: true