Skip to content

Commit d3ab32a

Browse files
authored
ci(fix): update conditions (runfinch#1099)
* ci: update conditions Signed-off-by: Justin Alvarez <[email protected]> * properly match conditions Signed-off-by: Justin Alvarez <[email protected]> * match the "runs-on" field Signed-off-by: Justin Alvarez <[email protected]> * update linux testing matrix to run all tests at once Signed-off-by: Justin Alvarez <[email protected]> --------- Signed-off-by: Justin Alvarez <[email protected]>
1 parent a4b9679 commit d3ab32a

File tree

4 files changed

+84
-47
lines changed

4 files changed

+84
-47
lines changed

Diff for: .github/workflows/ci-docs.yaml

+41-20
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,20 @@ on:
1515
paths:
1616
- '**.md'
1717
- 'contrib/**'
18-
- '.github/CODEOWNERS'
18+
- '!contrib/packaging/**'
19+
- '.github/**'
20+
- '!.github/workflows/ci.yaml'
21+
- '!.github/workflows/e2e-*.yaml'
1922
pull_request:
2023
branches:
2124
- main
2225
paths:
2326
- '**.md'
2427
- 'contrib/**'
2528
- '!contrib/packaging/**'
26-
- '.github/CODEOWNERS'
29+
- '.github/**'
30+
- '!.github/workflows/ci.yaml'
31+
- '!.github/workflows/e2e-*.yaml'
2732

2833
jobs:
2934
git-secrets:
@@ -32,10 +37,10 @@ jobs:
3237
- name: Pull latest awslabs/git-secrets repo
3338
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
3439
with:
35-
repository: awslabs/git-secrets
36-
ref: 1.3.0
37-
fetch-tags: true
38-
path: git-secrets
40+
repository: awslabs/git-secrets
41+
ref: 1.3.0
42+
fetch-tags: true
43+
path: git-secrets
3944
- name: Install git secrets from source
4045
run: sudo make install
4146
working-directory: git-secrets
@@ -72,28 +77,44 @@ jobs:
7277
runs-on: ubuntu-latest
7378
steps:
7479
- run: echo "Skipping CI for docs & contrib files"
75-
e2e-tests:
80+
macos-e2e-tests:
7681
strategy:
7782
matrix:
7883
os:
7984
[
80-
[self-hosted, macos, amd64, 13, test],
81-
[self-hosted, macos, amd64, 14, test],
82-
[self-hosted, macos, arm64, 13, test],
83-
[self-hosted, macos, arm64, 14, test],
85+
[13, test-e2e-container, X64, test],
86+
[13, test-e2e-container, arm64, test],
87+
[13, test-e2e-vm-serial, X64, test],
88+
[13, test-e2e-vm-serial, arm64, test],
89+
[14, test-e2e-container, X64, test],
90+
[14, test-e2e-container, arm64, test],
91+
[14, test-e2e-vm-serial, X64, test],
92+
[14, test-e2e-vm-serial, arm64, test],
8493
]
85-
test-command: ['test-e2e-vm-serial', 'test-e2e-container']
86-
runs-on: ${{ matrix.os }}
87-
steps:
88-
- run: echo "Skipping CI for docs & contrib files"
94+
uses: ./.github/workflows/e2e-docs.yaml
95+
with:
96+
os: ${{ matrix.os }}
8997
windows-e2e-tests:
9098
strategy:
9199
matrix:
92-
os: [[self-hosted, windows, amd64, test]]
93-
test-command: ['test-e2e-vm-serial', 'test-e2e-container']
94-
runs-on: ${{ matrix.os }}
95-
steps:
96-
- run: echo "Skipping CI for docs & contrib files"
100+
os:
101+
[[test-e2e-container, amd64, test], [test-e2e-vm-serial, amd64, test]]
102+
uses: ./.github/workflows/e2e-docs.yaml
103+
with:
104+
os: ${{ matrix.os }}
105+
linux-e2e-tests:
106+
strategy:
107+
matrix:
108+
os:
109+
[
110+
[amazonlinux, X64, 2, test],
111+
[amazonlinux, X64, 2023, test],
112+
[amazonlinux, arm64, 2, test],
113+
[amazonlinux, arm64, 2023, test],
114+
]
115+
uses: ./.github/workflows/e2e-docs.yaml
116+
with:
117+
os: ${{ matrix.os }}
97118
mdlint:
98119
runs-on: ubuntu-latest
99120
steps:

Diff for: .github/workflows/ci.yaml

+28-23
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,25 @@ on:
55
push:
66
branches:
77
- main
8-
paths-ignore:
9-
- "**.md"
10-
- "contrib/**"
11-
- ".github/CODEOWNERS"
8+
paths:
9+
- '**.go'
10+
- 'go.mod'
11+
- 'go.sum'
12+
- '.github/workflows/ci.yaml'
13+
- '.github/workflows/e2e-*.yaml'
14+
- 'contrib/packaging/**'
15+
- '!contrib/hello-finch/**'
1216
pull_request:
1317
branches:
1418
- main
1519
paths:
16-
- "**.go"
17-
- "contrib/packaging/**"
18-
- "!contrib/hello-finch/**"
19-
- "!.github/CODEOWNERS"
20+
- '**.go'
21+
- 'go.mod'
22+
- 'go.sum'
23+
- '.github/workflows/ci.yaml'
24+
- '.github/workflows/e2e-*.yaml'
25+
- 'contrib/packaging/**'
26+
- '!contrib/hello-finch/**'
2027
workflow_dispatch:
2128
permissions:
2229
id-token: write
@@ -147,10 +154,10 @@ jobs:
147154
strategy:
148155
fail-fast: false
149156
matrix:
150-
version: ["13", "14"]
151-
test-command: ["test-e2e-vm-serial", "test-e2e-container"]
152-
arch: ["X64", "arm64"]
153-
runner-type: ["test"]
157+
version: ['13', '14']
158+
test-command: ['test-e2e-vm-serial', 'test-e2e-container']
159+
arch: ['X64', 'arm64']
160+
runner-type: ['test']
154161
uses: ./.github/workflows/e2e-macos.yaml
155162
secrets: inherit
156163
with:
@@ -162,9 +169,9 @@ jobs:
162169
strategy:
163170
fail-fast: false
164171
matrix:
165-
test-command: ["test-e2e-vm-serial", "test-e2e-container"]
166-
arch: ["amd64"]
167-
runner-type: ["test"]
172+
test-command: ['test-e2e-vm-serial', 'test-e2e-container']
173+
arch: ['amd64']
174+
runner-type: ['test']
168175
uses: ./.github/workflows/e2e-windows.yaml
169176
secrets: inherit
170177
with:
@@ -175,26 +182,24 @@ jobs:
175182
strategy:
176183
fail-fast: false
177184
matrix:
178-
os: ["amazonlinux"]
179-
arch: ["X64", "arm64"]
180-
version: ["2023", "2"]
181-
test-command: ["test-e2e-container"]
182-
runner-type: ["test"]
185+
os: ['amazonlinux']
186+
arch: ['X64', 'arm64']
187+
version: ['2023', '2']
188+
runner-type: ['test']
183189
uses: ./.github/workflows/e2e-linux.yaml
184190
secrets: inherit
185191
with:
186192
os: ${{ matrix.os }}
187193
arch: ${{ matrix.arch }}
188194
version: ${{ matrix.version }}
189195
runner-type: ${{ matrix.runner-type }}
190-
test-command: ${{ matrix.test-command }}
191196

192197
mdlint:
193198
runs-on: ubuntu-latest
194199
steps:
195200
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
196201
- uses: avto-dev/markdown-lint@04d43ee9191307b50935a753da3b775ab695eceb # v1.5.0
197202
with:
198-
args: "**/*.md"
203+
args: '**/*.md'
199204
# CHANGELOG.md is only updated by release-please bot.
200-
ignore: "CHANGELOG.md"
205+
ignore: 'CHANGELOG.md'

Diff for: .github/workflows/e2e-docs.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: e2e-docs
2+
on:
3+
workflow_call:
4+
inputs:
5+
os:
6+
type: string
7+
required: true
8+
jobs:
9+
test:
10+
runs-on: ['self-hosted', '${{ fromJson(inputs.os) }}']
11+
steps:
12+
- name: Skip
13+
run: |
14+
echo "Skipping CI for docs & contrib files"

Diff for: .github/workflows/e2e-linux.yaml

+1-4
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ on:
1414
runner-type:
1515
type: string
1616
required: true
17-
test-command:
18-
type: string
19-
required: true
2017

2118
permissions:
2219
# This is required for configure-aws-credentials to request an OIDC JWT ID token to access AWS resources later on.
@@ -96,7 +93,7 @@ jobs:
9693
git clean -f -d
9794
# required by one of the tests which uses SSH_AUTH_SOCK
9895
eval "$(ssh-agent -s)"
99-
INSTALLED=true REGISTRY=${{ steps.vars.outputs.has_creds == true && env.REGISTRY || '' }} sudo -E make ${{ inputs.test-command }}
96+
INSTALLED=true REGISTRY=${{ steps.vars.outputs.has_creds == true && env.REGISTRY || '' }} sudo -E make test-e2e-container
10097
- name: Clean up repo AL2
10198
if: ${{ (startsWith(inputs.os, 'amazon') && inputs.version == '2' && always() ) }}
10299
run: |

0 commit comments

Comments
 (0)