-
Notifications
You must be signed in to change notification settings - Fork 16
51 lines (48 loc) · 1.12 KB
/
go.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
# Maintained in https://github.com/coreos/repo-templates
# Do not edit downstream.
name: Go
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
# don't waste job slots on superseded code
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Test
strategy:
matrix:
go-version: [1.22.x, 1.23.x]
os: [ubuntu-latest]
include:
- go-version: 1.23.x
os: macos-latest
- go-version: 1.23.x
os: windows-latest
runs-on: ${{ matrix.os }}
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Check out repository
uses: actions/checkout@v4
- name: Check modules
run: go mod verify
- name: Build
shell: bash
run: make
- name: Test
shell: bash
run: make test
- name: Run linter
uses: golangci/golangci-lint-action@v3
if: runner.os == 'Linux'
with:
version: v1.61.0
args: -E=gofmt --timeout=30m0s