-
Notifications
You must be signed in to change notification settings - Fork 219
60 lines (49 loc) · 1.35 KB
/
Copy pathgo.yml
File metadata and controls
60 lines (49 loc) · 1.35 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
name: Go
on: [push, pull_request]
permissions:
contents: read
jobs:
generated:
name: Generated files
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: 1.25.x
- name: Check out code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Regenerate models
run: go generate ./...
- name: Verify generated files are current
run: |
status=$(git status --porcelain)
if [ -n "$status" ]; then
printf '%s\n' "$status"
exit 1
fi
build:
name: Build
strategy:
matrix:
go-version: [1.26.x, 1.25.x]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v7
with:
go-version: ${{ matrix.go-version }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v7.0.1
with:
submodules: true
- name: Get dependencies
run: go get -v -t -d ./...
- name: Build
run: go build -v .
- name: Test
run: go test -race -v ./...