-
Notifications
You must be signed in to change notification settings - Fork 41
66 lines (62 loc) · 1.62 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
GO_VERSION: "1.23.0"
GO_LANG_CI_LINT_VERSION: "v1.60.1"
name: run tests
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Checkout code
uses: actions/checkout@v4
- name: Run linters
uses: golangci/golangci-lint-action@v6
with:
version: ${{ env.GO_LANG_CI_LINT_VERSION }}
test:
strategy:
matrix:
go-version: [ "1.23.0", "1.22.5" ]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
if: success()
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v4
- name: Run tests
run: go test -v -covermode=count
coverage:
runs-on: ubuntu-latest
strategy:
matrix:
actver: [ "v1", "v1.1.0", "v1.0.9", "v1.0.7", "v1.0.6"]
toolver: [ "latest", "v1.1.1", "v1.1.0", "v1.0.9", "v1.0.7", "v1.0.6"]
steps:
- name: Install Go
if: success()
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Checkout code
uses: actions/checkout@v4
- name: Calc coverage
run: |
go test -v -covermode=count -coverprofile=coverage.out
- name: gcov2lcov
uses: jandelgado/gcov2lcov-action@{{ .actver }}
with:
version: ${{ .toolver }}