-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (62 loc) · 1.74 KB
/
Copy pathgo.yml
File metadata and controls
62 lines (62 loc) · 1.74 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
name: 'Go'
on:
pull_request: {}
push:
branches:
- 'master'
permissions:
contents: 'read'
jobs:
cover:
name: 'Coverage'
runs-on: 'ubuntu-latest'
steps:
- name: 'Harden Runner'
uses: step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1
with:
egress-policy: 'audit'
- name: 'Set up Go'
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
go-version: 1.26
- name: 'Checkout'
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: 'Get Dependencies'
run: |
go get -v -t -d ./...
- name: 'Test'
run: |
go test -coverprofile=coverage.txt -v ./...
- name: 'Coverage'
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
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@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1
with:
egress-policy: 'audit'
- name: 'Set up Go ${{ matrix.go }}'
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
go-version: ${{ matrix.go }}
- name: 'Checkout'
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: 'Get Dependencies'
run: |
go get -v -t -d ./...
- name: 'Build'
run: |
go build -v ./...
- name: 'Test'
run: |
go test -v ./...