Skip to content

Commit

Permalink
Merge pull request #147 from jsturtevant/handle-oci-artifacts
Browse files Browse the repository at this point in the history
Handle Wasm Images with wasm media types
  • Loading branch information
Mossaka authored Oct 25, 2023
2 parents 776e81c + 94a7fdb commit 5a9f656
Show file tree
Hide file tree
Showing 35 changed files with 826 additions and 122 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/action-test-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,21 @@ name: Run end to end tests on kind

on:
workflow_call:
inputs:
image:
type: string
default: img

jobs:
test-image:
name: build test image
name: build test ${{ inputs.image }}
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v3
- name: build
run: make dist/img.tar
run: make dist/${{ inputs.image }}.tar
- name: Upload artifacts
uses: actions/upload-artifact@master
with:
name: test-image
path: dist/img.tar
name: test-${{ inputs.image }}
path: dist/${{ inputs.image }}.tar
2 changes: 1 addition & 1 deletion .github/workflows/action-test-k3s.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Download test image
uses: actions/download-artifact@master
with:
name: test-image
name: test-img
path: dist
- name: run
timeout-minutes: 5
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/action-test-kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,16 @@ on:
runtime:
required: true
type: string
image:
type: string
default: img
test-command:
type: string
required: true

jobs:
e2e-kind:
name: e2e kind test on ${{ inputs.os }}
name: e2e kind test on ${{ inputs.os }} with ${{ inputs.image }}
runs-on: ${{ inputs.os }}
steps:
- uses: actions/checkout@v3
Expand All @@ -32,11 +38,11 @@ jobs:
- name: Download test image
uses: actions/download-artifact@master
with:
name: test-image
name: test-${{ inputs.image }}
path: dist
- name: run
timeout-minutes: 5
run: make test/k8s-${{ inputs.runtime }}
timeout-minutes: 7
run: ${{ inputs.test-command }}
# only runs when the previous step fails
- name: inspect failed pods
if: failure()
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/action-test-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Download test image
uses: actions/download-artifact@master
with:
name: test-image
name: test-img
path: dist
- name: run
timeout-minutes: 5
Expand Down
28 changes: 26 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@ jobs:
runtime: ["common"] # not required, but groups jobs
uses: ./.github/workflows/action-test-image.yml

test-image-oci:
name: ${{ matrix.runtime }}
strategy:
matrix:
runtime: ["common"] # not required, but groups jobs
uses: ./.github/workflows/action-test-image.yml
with:
image: img-oci

build-ubuntu:
name: ${{ matrix.runtime }}
strategy:
Expand Down Expand Up @@ -67,7 +76,7 @@ jobs:
os: ${{ matrix.os }}
runtime: ${{ matrix.runtime }}

e2e-wasmtime:
e2e-kind:
name: ${{ matrix.runtime }}
needs: [build-ubuntu, test-image]
strategy:
Expand All @@ -79,7 +88,22 @@ jobs:
with:
os: ${{ matrix.os }}
runtime: ${{ matrix.runtime }}

test-command: make test/k8s-${{ matrix.runtime }}

e2e-kind-oci:
name: ${{ matrix.runtime }}
needs: [build-ubuntu, test-image-oci]
strategy:
matrix:
os: ["ubuntu-22.04"]
runtime: ["wasmtime", "wasmedge", "wasmer"]
uses: ./.github/workflows/action-test-kind.yml
with:
os: ${{ matrix.os }}
runtime: ${{ matrix.runtime }}
image: img-oci
test-command: make test/k8s-oci-${{ matrix.runtime }}

e2e-k3s:
name: ${{ matrix.runtime }}
needs: [build-ubuntu, test-image]
Expand Down
Loading

0 comments on commit 5a9f656

Please sign in to comment.