-
-
Notifications
You must be signed in to change notification settings - Fork 103
67 lines (67 loc) · 1.82 KB
/
go.yml
File metadata and controls
67 lines (67 loc) · 1.82 KB
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
67
name: 'Go'
on:
pull_request:
branches:
- 'master'
push:
branches:
- 'master'
merge_group:
branches:
- 'master'
permissions:
contents: 'read'
jobs:
cover:
name: 'Coverage'
runs-on: 'ubuntu-latest'
steps:
- name: 'Harden Runner'
uses: step-security/harden-runner@a5ad31d6a139d249332a2605b85202e8c0b78450 # v2.19.1
with:
egress-policy: 'audit'
- name: 'Set up Go'
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: '1.26'
- name: 'Checkout'
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: 'Get Dependencies'
run: |
go get -v -t ./...
- name: 'Test'
run: |
go test -coverprofile=coverage.txt -v ./...
- name: 'Coverage'
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
build:
name: 'Build and Test'
runs-on: 'ubuntu-latest'
strategy:
matrix:
go:
- '1.25'
- '1.26'
fail-fast: false
steps:
- name: 'Harden Runner'
uses: step-security/harden-runner@a5ad31d6a139d249332a2605b85202e8c0b78450 # v2.19.1
with:
egress-policy: 'audit'
- name: 'Set up Go ${{ matrix.go }}'
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: ${{ matrix.go }}
- name: 'Checkout'
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: 'Get Dependencies'
run: |
go get -v -t ./...
- name: 'Build'
run: |
go build -v ./...
- name: 'Test'
run: |
go test -race -v ./...