Skip to content

Update codecov/codecov-action action to v5 #115

Update codecov/codecov-action action to v5

Update codecov/codecov-action action to v5 #115

Workflow file for this run

name: golang-test
on:
# pull-request events are not triggered when a PR is merged
# push events are not triggered when a PR created from a fork repository
# So we need both to run tests on every PR and after merging
pull_request:
push:
branches:
- main
jobs:
test:
name: test
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup
uses: actions/setup-go@v5
with:
go-version: ^1.19.4
check-latest: true
- name: install dependencies
run: go mod tidy
- name: lint
run: go vet ./...
- name: test
run: go test -v -cover -race -covermode=atomic -coverprofile=coverage.out ./...
- name: build
run: go build ./...
- name: cross build
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: "~> v2"
args: build --snapshot --clean
- uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.out
name: codecov-umbrella
fail_ci_if_error: true
verbose: true