Skip to content

Update codecov/codecov-action action to v5 (#158) #243

Update codecov/codecov-action action to v5 (#158)

Update codecov/codecov-action action to v5 (#158) #243

Workflow file for this run

name: lint_test_coverage
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
tests:
name: "Lint + Tests + Coverage"
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.21']
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: latest
- name: Run unit tests
run: |
make test-container KEEP_TEST_CONTAINER=1 GO_VERSION=${{ matrix.go-version }}
podman cp go-test-container:/app/coverage.out .
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: ./coverage.out
flags: go-${{ matrix.go-version }}
name: coverage-go-${{ matrix.go-version }}
fail_ci_if_error: true
verbose: true