-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (58 loc) · 1.61 KB
/
Copy pathci.yml
File metadata and controls
72 lines (58 loc) · 1.61 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
68
69
70
71
72
name: Go
on:
push:
branches: [ "main", "dev" ]
pull_request:
branches: [ "**" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: '1.26'
- name: Build
run: ./tools/build.sh
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: '1.26'
- name: Test
run: go test -race ./...
- name: Sub command Test
run: $GITHUB_WORKSPACE/tools/sub-command-test.sh
golangci-lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: '1.26'
- name: golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: v2.11.4
verify: false
# This linter works based on the file modification when running under github actions because it's
# not given full access to the git history and therefore gets the wrong date for all files.
args: --disable goheader
fieldalignment:
name: fieldalignment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: '1.26'
- name: install fieldalignment
run: go install golang.org/x/tools/go/analysis/passes/fieldalignment/cmd/fieldalignment@latest
- name: check for diff
run: $GITHUB_WORKSPACE/tools/fieldalignment-lint.sh