-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (51 loc) · 1.24 KB
/
ci-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
52
53
# https://github.com/golang/go/issues/59968
name: ʕ◔ϖ◔ʔ
on:
push:
branches:
- main
paths:
- '.github/workflows/ci-go.yml'
- '**.go'
- 'go.*'
- 'testdata/**'
- 'Makefile.toml'
pull_request:
paths:
- '.github/workflows/ci-go.yml'
- '**.go'
- 'go.*'
- 'testdata/**'
- 'Makefile.toml'
workflow_dispatch:
jobs:
test:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-24.04
- macos-15 # Apple Silicon. Doesn't match for my Intel Mac, but preferring with the speed.
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache-dependency-path: 'go.sum'
- run: go test ./...
- run: go build -v -race ./...
lint:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache-dependency-path: 'go.sum'
- name: check format
run: go fmt ./... && git add --intent-to-add . && git diff --exit-code
- run: go vet ./...