Skip to content

Fix: CI send coverage condition #39

Fix: CI send coverage condition

Fix: CI send coverage condition #39

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.18.1
- name: install dependencies
run: go get -v -t -d ./...
- name: lint
run: go vet ./...
- name: test
run: go test -v -cover -race -covermode=atomic -coverprofile=coverage.out ./...
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.out
name: codecov-umbrella
fail_ci_if_error: true
verbose: true