-
Notifications
You must be signed in to change notification settings - Fork 7
39 lines (38 loc) · 877 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
29
30
31
32
33
34
35
36
37
38
39
name: ci
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go-version:
- "1.21"
- "1.22"
- "1.23"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Go vet
run: go vet ./...
- name: Go build
run: go build ./...
- name: Go test
run: |
go test -v -race \
-coverprofile=coverage.txt -covermode=atomic -coverpkg=all \
$(go list ./... | grep -v "/examples/")
- name: Upload coverage report
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}