.github/workflows/run-tests.yaml: configured action to use codecov token #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Tests | |
on: [ push ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go: [ '1.18', '1.19', '1.20', '1.21', '1.22' ] | |
name: Go ${{ matrix.go }} sample | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: '0' | |
- name: Setup go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Run tests | |
run: make test | |
- name: Upload test coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
if: matrix.go == '1.18' | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./coverage.txt | |
fail_ci_if_error: true | |
verbose: true | |
- name: Run examples | |
run: make test.examples | |
- name: Run linter | |
run: make lint | |
- name: Run vulnerabilities scan | |
run: make scan |