Skip to content

Use codecov token.

Use codecov token. #15

Workflow file for this run

name: golangci-lint
on:
push:
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v5
with:
go-version-file: './go.mod'
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.54
test:
name: unit tests
runs-on: ubuntu-latest
needs: golangci
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v5
with:
go-version-file: './go.mod'
- run: |
go test \
-coverpkg=github.com/lauravuo/vegaanibotti/... \
-coverprofile=coverage.txt \
-covermode=atomic \
./...
- name: upload coverage
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: ./coverage.txt
fail_ci_if_error: ${{ github.ref_name != 'main' }}
verbose: true