Skip to content

Commit eff3e0a

Browse files
committed
Add ability to parse OCI images
Signed-off-by: James Sturtevant <[email protected]>
1 parent 1d2cd19 commit eff3e0a

File tree

30 files changed

+775
-110
lines changed

30 files changed

+775
-110
lines changed

Diff for: .github/workflows/action-test-image.yml

+8-4
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,21 @@ name: Run end to end tests on kind
22

33
on:
44
workflow_call:
5+
inputs:
6+
image:
7+
type: string
8+
default: img
59

610
jobs:
711
test-image:
8-
name: build test image
12+
name: build test ${{ inputs.image }}
913
runs-on: "ubuntu-latest"
1014
steps:
1115
- uses: actions/checkout@v3
1216
- name: build
13-
run: make dist/img.tar
17+
run: make dist/${{ inputs.image }}.tar
1418
- name: Upload artifacts
1519
uses: actions/upload-artifact@master
1620
with:
17-
name: test-image
18-
path: dist/img.tar
21+
name: test-${{ inputs.image }}
22+
path: dist/${{ inputs.image }}.tar

Diff for: .github/workflows/action-test-k3s.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- name: Download test image
3333
uses: actions/download-artifact@master
3434
with:
35-
name: test-image
35+
name: test-img
3636
path: dist
3737
- name: run
3838
timeout-minutes: 5

Diff for: .github/workflows/action-test-kind.yml

+10-4
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,16 @@ on:
99
runtime:
1010
required: true
1111
type: string
12+
image:
13+
type: string
14+
default: img
15+
test-command:
16+
type: string
17+
required: true
1218

1319
jobs:
1420
e2e-kind:
15-
name: e2e kind test on ${{ inputs.os }}
21+
name: e2e kind test on ${{ inputs.os }} with ${{ inputs.image }}
1622
runs-on: ${{ inputs.os }}
1723
steps:
1824
- uses: actions/checkout@v3
@@ -32,11 +38,11 @@ jobs:
3238
- name: Download test image
3339
uses: actions/download-artifact@master
3440
with:
35-
name: test-image
41+
name: test-${{ inputs.image }}
3642
path: dist
3743
- name: run
38-
timeout-minutes: 5
39-
run: make test/k8s-${{ inputs.runtime }}
44+
timeout-minutes: 7
45+
run: ${{ inputs.test-command }}
4046
# only runs when the previous step fails
4147
- name: inspect failed pods
4248
if: failure()

Diff for: .github/workflows/action-test-smoke.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- name: Download test image
3333
uses: actions/download-artifact@master
3434
with:
35-
name: test-image
35+
name: test-img
3636
path: dist
3737
- name: run
3838
timeout-minutes: 5

Diff for: .github/workflows/ci.yml

+26-2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ jobs:
2828
runtime: ["common"] # not required, but groups jobs
2929
uses: ./.github/workflows/action-test-image.yml
3030

31+
test-image-oci:
32+
name: ${{ matrix.runtime }}
33+
strategy:
34+
matrix:
35+
runtime: ["common"] # not required, but groups jobs
36+
uses: ./.github/workflows/action-test-image.yml
37+
with:
38+
image: img-oci
39+
3140
build-ubuntu:
3241
name: ${{ matrix.runtime }}
3342
strategy:
@@ -67,7 +76,7 @@ jobs:
6776
os: ${{ matrix.os }}
6877
runtime: ${{ matrix.runtime }}
6978

70-
e2e-wasmtime:
79+
e2e-kind:
7180
name: ${{ matrix.runtime }}
7281
needs: [build-ubuntu, test-image]
7382
strategy:
@@ -79,7 +88,22 @@ jobs:
7988
with:
8089
os: ${{ matrix.os }}
8190
runtime: ${{ matrix.runtime }}
82-
91+
test-command: make test/k8s-${{ matrix.runtime }}
92+
93+
e2e-kind-oci:
94+
name: ${{ matrix.runtime }}
95+
needs: [build-ubuntu, test-image-oci]
96+
strategy:
97+
matrix:
98+
os: ["ubuntu-22.04"]
99+
runtime: ["wasmtime", "wasmedge", "wasmer"]
100+
uses: ./.github/workflows/action-test-kind.yml
101+
with:
102+
os: ${{ matrix.os }}
103+
runtime: ${{ matrix.runtime }}
104+
image: img-oci
105+
test-command: make test/k8s-oci-${{ matrix.runtime }}
106+
83107
e2e-k3s:
84108
name: ${{ matrix.runtime }}
85109
needs: [build-ubuntu, test-image]

0 commit comments

Comments
 (0)