-
Notifications
You must be signed in to change notification settings - Fork 1
28 lines (27 loc) · 988 Bytes
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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@v5
with:
go-version: "1.23.3"
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- 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@v6
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.61.0
args: --skip-files .*_test.go
- name: Upload coverage to codecov
uses: codecov/codecov-action@v4
with:
files: ./cover.out