ci(build): add codecov (#518)

* ci(build): add codecov

* add missing id-token permission
This commit is contained in:
Alexis Couvreur
2025-02-09 18:18:50 -08:00
committed by GitHub
parent 35a8b07c20
commit 610d7c0a10

View File

@@ -14,20 +14,28 @@ jobs:
build:
name: Build
permissions:
contents: read
id-token: write # OIDC with Codecov
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Set up Go 1.22
- name: Set up Go 1.23
uses: actions/setup-go@v5
with:
go-version: ^1.22
go-version: ^1.23
cache-dependency-path: go.sum
- name: Build
run: go build -v .
- name: Test
run: go test -v ./...
run: go test -v -race -covermode atomic -coverprofile coverage.txt ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
use_oidc: true