-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (40 loc) · 945 Bytes
/
test.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
40
---
name: Test
"on":
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
strategy:
matrix:
go: ['1.22', '1.21']
name: Test on Go ${{ matrix.go }}
runs-on: ubuntu-latest
permissions:
checks: write
contents: read
pull-requests: read
statuses: write
steps:
- name: ✔ Check out
uses: actions/checkout@v4
- name: 🐹 Set up Go ${{ matrix.go }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
check-latest: true
- name: 🧸 golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: v1.57.2
- name: 🔨 Test
run: go test -race -coverprofile=cover.out ./...
- name: 🧑🏻💻 codecov
uses: codecov/codecov-action@v4
with:
files: ./cover.out
token: ${{ secrets.CODECOV_TOKEN }}