Skip to content

chore: update codecov/codecov-action action to v6 #310

chore: update codecov/codecov-action action to v6

chore: update codecov/codecov-action action to v6 #310

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
lint-code:
name: Run Linters
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
fetch-depth: 0
- name: Review code
uses: reviewdog/action-golangci-lint@c76cceaaab89abe74e649d2e34c6c9adc26662d2 # v2.10.0
with:
go_version: 1.25.0
golangci_lint_version: v2.4.0
reporter: github-pr-review
fail_on_error: true
check-licenses:
name: Check Licenses
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Set up Go
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version: 1.25.0
- name: Get google/go-licenses package
run: go install github.com/google/go-licenses@v1.6.0
- name: Check the licenses
run: |
go-licenses check --disallowed_types=forbidden,restricted,reciprocal,permissive,unknown .
test:
name: Run Tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version: 1.25.0
- name: Execute tests
run: |
go test -v -gcflags=all=-l -cover ./... -coverprofile coverage.out -coverpkg ./...
- name: Upload code coverage report
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
with:
files: coverage.out
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}