Skip to content

Commit 3840cce

Browse files
authored
Simplify CI workflows (#2805)
* Simplify CI workflows Signed-off-by: jose.vazquez <[email protected]> * Split unit-tests on its own for performance Signed-off-by: jose.vazquez <[email protected]> --------- Signed-off-by: jose.vazquez <[email protected]>
1 parent 490ab3d commit 3840cce

File tree

17 files changed

+169
-161
lines changed

17 files changed

+169
-161
lines changed

.github/workflows/check-licenses.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
1-
name: Unit Tests
1+
name: AKO CI
22

33
on:
44
workflow_call:
55

66
jobs:
77
unit-test:
8-
name: Unit tests
8+
name: AKO unit-tests
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v5
1212
with:
1313
ref: ${{github.event.pull_request.head.sha}}
14-
submodules: 'true'
1514

1615
- name: Install devbox
1716
uses: jetify-com/[email protected]
@@ -21,9 +20,6 @@ jobs:
2120
- name: Run testing
2221
run: devbox run -- 'GO_TEST_FLAGS="-coverprofile=coverage.out" make unit-test'
2322

24-
- name: Test tools
25-
run: devbox run -- 'make test-tools'
26-
2723
- name: Upload coverage to Codecov
2824
uses: codecov/codecov-action@v5
2925
with:
@@ -32,3 +28,19 @@ jobs:
3228
token: ${{ secrets.CODECOV_TOKEN }}
3329
files: coverage.out
3430
verbose: true
31+
32+
lint:
33+
name: AKO linting
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v5
37+
with:
38+
ref: ${{github.event.pull_request.head.sha}}
39+
40+
- name: Install devbox
41+
uses: jetify-com/[email protected]
42+
with:
43+
enable-cache: 'true'
44+
45+
- name: Run all linters
46+
run: devbox run -- 'make -j3 all-lints'

.github/workflows/clean.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Clean tool CI
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
paths:
7+
- 'tools/clean/**'
8+
pull_request:
9+
branches: [ "main" ]
10+
paths:
11+
- 'tools/clean/**'
12+
13+
jobs:
14+
15+
clean:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v5
19+
20+
- name: Set up Go
21+
uses: actions/setup-go@v6
22+
with:
23+
go-version: '1.24'
24+
25+
- name: CI checks
26+
working-directory: ./tools/clean
27+
run: go build ./... && go test ./...
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Compute test labels tool CI
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
paths:
7+
- 'tools/compute-test-labels/**'
8+
pull_request:
9+
branches: [ "main" ]
10+
paths:
11+
- 'tools/compute-test-labels/**'
12+
13+
jobs:
14+
15+
compute-test-labels:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v5
19+
20+
- name: Set up Go
21+
uses: actions/setup-go@v6
22+
with:
23+
go-version: '1.24'
24+
25+
- name: CI checks
26+
working-directory: ./tools/compute-test-labels
27+
run: go build ./... && go test ./...

.github/workflows/githubjobs.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Githubjobs tool CI
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
paths:
7+
- 'tools/githubjobs/**'
8+
pull_request:
9+
branches: [ "main" ]
10+
paths:
11+
- 'tools/githubjobs/**'
12+
13+
jobs:
14+
15+
githubjobs:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v5
19+
20+
- name: Set up Go
21+
uses: actions/setup-go@v6
22+
with:
23+
go-version: '1.24'
24+
25+
- name: CI checks
26+
working-directory: ./tools/githubjobs
27+
run: go build ./... && go test ./...

.github/workflows/license-header-check.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

.github/workflows/lint.yaml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/makejwt.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Make JWT tool CI
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
paths:
7+
- 'tools/makejwt/**'
8+
pull_request:
9+
branches: [ "main" ]
10+
paths:
11+
- 'tools/makejwt/**'
12+
13+
jobs:
14+
15+
makejwt:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v5
19+
20+
- name: Set up Go
21+
uses: actions/setup-go@v6
22+
with:
23+
go-version: '1.24'
24+
25+
- name: CI checks
26+
working-directory: ./tools/makejwt
27+
run: go build ./... && go test ./...

.github/workflows/metrics.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Metrics tool CI
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
paths:
7+
- 'tools/metrics/**'
8+
pull_request:
9+
branches: [ "main" ]
10+
paths:
11+
- 'tools/metrics/**'
12+
13+
jobs:
14+
15+
metrics:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v5
19+
20+
- name: Set up Go
21+
uses: actions/setup-go@v6
22+
with:
23+
go-version: '1.24'
24+
25+
- name: CI checks
26+
working-directory: ./tools/metrics
27+
run: go build ./... && go test ./...

.github/workflows/test.yml

Lines changed: 6 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -47,31 +47,10 @@ jobs:
4747
- name: allowed message
4848
run: echo "Allowed to run tests"
4949

50-
lint:
50+
ci:
5151
needs:
5252
- run-tests
53-
uses: ./.github/workflows/lint.yaml
54-
55-
validate-manifests:
56-
needs:
57-
- run-tests
58-
uses: ./.github/workflows/validate-manifests.yml
59-
60-
unit-tests:
61-
needs:
62-
- run-tests
63-
uses: ./.github/workflows/test-unit.yml
64-
secrets: inherit
65-
66-
license-header-check:
67-
needs:
68-
- run-tests
69-
uses: ./.github/workflows/license-header-check.yml
70-
71-
check-licenses:
72-
needs:
73-
- run-tests
74-
uses: ./.github/workflows/check-licenses.yml
53+
uses: ./.github/workflows/ci.yml
7554

7655
cloud-tests-filter:
7756
needs:
@@ -80,30 +59,21 @@ jobs:
8059

8160
tests-selectable:
8261
needs:
83-
- lint
84-
- unit-tests
85-
- validate-manifests
86-
- check-licenses
62+
- ci
8763
- cloud-tests-filter
8864
uses: ./.github/workflows/tests-selectable.yaml
8965
secrets: inherit
9066

9167
e2e2:
9268
needs:
93-
- lint
94-
- unit-tests
95-
- validate-manifests
96-
- check-licenses
69+
- ci
9770
- cloud-tests-filter
9871
uses: ./.github/workflows/tests-e2e2.yaml
9972
secrets: inherit
10073

10174
cloud-tests:
10275
needs:
103-
- lint
104-
- unit-tests
105-
- validate-manifests
106-
- check-licenses
76+
- ci
10777
- cloud-tests-filter
10878
if: |
10979
github.event_name == 'merge_group' || needs.cloud-tests-filter.outputs.run-cloud-tests == 'true'
@@ -113,10 +83,7 @@ jobs:
11383
start-promote-image:
11484
name: Start Promote Image
11585
needs:
116-
- lint
117-
- unit-tests
118-
- validate-manifests
119-
- check-licenses
86+
- ci
12087
- e2e2
12188
- cloud-tests
12289
if: github.ref_name == 'main' && github.event_name != 'pull_request_target' && github.event_name != 'pull_request'

0 commit comments

Comments
 (0)