-
Notifications
You must be signed in to change notification settings - Fork 9
116 lines (108 loc) · 3.3 KB
/
Copy pathci.yml
File metadata and controls
116 lines (108 loc) · 3.3 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: CI
on:
push:
branches: [main]
pull_request:
jobs:
detect-changes:
runs-on: ubuntu-latest
outputs:
cfl: ${{ steps.filter.outputs.cfl }}
jtk: ${{ steps.filter.outputs.jtk }}
shared: ${{ steps.filter.outputs.shared }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
cfl:
- 'tools/cfl/**'
jtk:
- 'tools/jtk/**'
shared:
- 'shared/**'
build-test-cfl:
needs: detect-changes
if: needs.detect-changes.outputs.cfl == 'true' || needs.detect-changes.outputs.shared == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.26'
- name: Tidy cfl
run: cd tools/cfl && go mod tidy && git diff --exit-code go.mod go.sum
- name: Build cfl
run: go build -v ./tools/cfl/...
- name: Test cfl
run: go test -v -race -coverprofile=coverage-cfl.out ./tools/cfl/...
build-test-jtk:
needs: detect-changes
if: needs.detect-changes.outputs.jtk == 'true' || needs.detect-changes.outputs.shared == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.26'
- name: Tidy jtk
run: cd tools/jtk && go mod tidy && git diff --exit-code go.mod go.sum
- name: Build jtk
run: go build -v ./tools/jtk/...
- name: Test jtk
run: go test -v -race -coverprofile=coverage-jtk.out ./tools/jtk/...
lint-cfl:
needs: detect-changes
if: needs.detect-changes.outputs.cfl == 'true' || needs.detect-changes.outputs.shared == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.26'
- uses: golangci/golangci-lint-action@v7
with:
working-directory: tools/cfl
version: v2.12.2
lint-jtk:
needs: detect-changes
if: needs.detect-changes.outputs.jtk == 'true' || needs.detect-changes.outputs.shared == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.26'
- uses: golangci/golangci-lint-action@v7
with:
working-directory: tools/jtk
version: v2.12.2
build-test-shared:
needs: detect-changes
if: needs.detect-changes.outputs.shared == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.26'
- name: Tidy shared
run: cd shared && go mod tidy && git diff --exit-code go.mod go.sum
- name: Build shared
run: go build -v ./shared/...
- name: Test shared
run: go test -v -race -coverprofile=coverage-shared.out ./shared/...
lint-shared:
needs: detect-changes
if: needs.detect-changes.outputs.shared == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.26'
- uses: golangci/golangci-lint-action@v7
with:
working-directory: shared
version: v2.12.2