Use 1.20 in CI #173
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: CI pipeline | |
# This workflow is triggered on pushes to the repository. | |
on: [push] | |
jobs: | |
build: | |
name: Test & Coverage | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: "1.20" | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v2 | |
- name: Run tests | |
run: go test -coverpkg=./... -race ./... -coverprofile cover.out.tmp -covermode=atomic | |
- name: Removes mocks from tests | |
run: cat cover.out.tmp | grep -v "_mock.go" > cover.out | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. | |
version: v1.29 | |
args: --skip-files .*_test.go | |
- name: Upload coverage to codecov | |
uses: codecov/codecov-action@v2 | |
with: | |
files: ./cover.out |