-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (55 loc) · 1.27 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
name: CI
# Controls when the workflow will run
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
jobs:
golangci-lint:
permissions:
contents: read
pull-requests: read
runs-on: ubuntu-latest
steps:
# Get the repositery's code
- name: Checkout
uses: actions/checkout@v3
- name: Set up Golang
uses: actions/setup-go@v3
with:
go-version: '1.22.x'
check-latest: true
cache: true
- run: "go test ./..."
- run: "go vet ./..."
- uses: dominikh/staticcheck-action@v1.3.0
with:
version: "2023.1.6"
install-go: false
test:
strategy:
fail-fast: false
matrix:
platform:
- ubuntu
go:
- 21
name: 'tests on ${{ matrix.platform }} | 1.${{ matrix.go }}.x'
runs-on: ${{ matrix.platform }}-latest
steps:
# Get the repositery's code
- name: Checkout
uses: actions/checkout@v3
- name: Set up Golang
uses: actions/setup-go@v3
with:
go-version: '1.${{ matrix.go }}.x'
cache: true
- name: Run tests
run: go clean -testcache && go test -race -cover -covermode=atomic ./...