Skip to content

Commit fb71dd8

Browse files
committed
ci: reduce push fan-out and keep full matrix for PR/manual
1 parent a3f1f2b commit fb71dd8

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

.github/workflows/build.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ on:
77
pull_request:
88
branches:
99
- "*"
10+
workflow_dispatch:
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
1015

1116
jobs:
1217
build:
@@ -23,7 +28,24 @@ jobs:
2328
run: |
2429
make build
2530
31+
smoke-tests:
32+
needs: [build]
33+
if: github.event_name == 'push'
34+
name: smoke / cmd
35+
runs-on: ubuntu-latest
36+
steps:
37+
- name: Checkout
38+
uses: actions/checkout@v4
39+
- name: Setup Go
40+
uses: actions/setup-go@v5
41+
with:
42+
go-version: "1.22.0"
43+
- shell: bash
44+
run: |
45+
go test ./cmd/... -timeout=20m
46+
2647
e2e-tests:
48+
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
2749
needs: [build]
2850
name: e2e / ${{ matrix.suite.name }}
2951
runs-on: ubuntu-latest
@@ -107,6 +129,7 @@ jobs:
107129
run: exit 1
108130

109131
generic-tests:
132+
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
110133
needs: build
111134
name: tests - ${{ matrix.suite.name }}
112135
runs-on: ubuntu-latest
@@ -207,6 +230,7 @@ jobs:
207230
run: exit 1
208231

209232
test-report:
233+
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
210234
needs: [generic-tests, e2e-tests]
211235
name: test-report
212236
if: always() && !contains(needs.*.result, 'skipped')

.github/workflows/build_and_test.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ on:
77
pull_request:
88
branches:
99
- "*"
10+
workflow_dispatch:
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
1015

1116
jobs:
1217
build:
@@ -23,7 +28,24 @@ jobs:
2328
run: |
2429
make build
2530
31+
smoke-tests:
32+
needs: [build]
33+
if: github.event_name == 'push'
34+
name: smoke / cmd
35+
runs-on: ubuntu-latest
36+
steps:
37+
- name: Checkout
38+
uses: actions/checkout@v4
39+
- name: Setup Go
40+
uses: actions/setup-go@v5
41+
with:
42+
go-version: "1.22.0"
43+
- shell: bash
44+
run: |
45+
go test ./cmd/... -timeout=20m
46+
2647
e2e-tests:
48+
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
2749
needs: build
2850
name: e2e / ${{ matrix.suite.name }}
2951
runs-on: ubuntu-latest
@@ -107,6 +129,7 @@ jobs:
107129
run: exit 1
108130

109131
generic-tests:
132+
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
110133
needs: build
111134
name: tests - ${{ matrix.suite.name }}
112135
runs-on: ubuntu-latest
@@ -208,6 +231,7 @@ jobs:
208231
run: exit 1
209232

210233
test-report:
234+
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
211235
needs: [generic-tests, e2e-tests]
212236
name: test-report
213237
if: always() && !contains(needs.*.result, 'skipped')

0 commit comments

Comments
 (0)