Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle Wasm Images with wasm media types #147

Merged
merged 2 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thought: I'm not a big fan of having the full make command here. I was going to suggest refactoring the Makefile so that we can unify the k3s and kind testing workflows, with and without -oci. But I don't want to add noise to an already involved PR. Let's address that after this one is merged!


e2e-kind-oci:
name: ${{ matrix.runtime }}
needs: [build-ubuntu, test-image-oci]
strategy:
matrix:
os: ["ubuntu-22.04"]
jsturtevant marked this conversation as resolved.
Show resolved Hide resolved
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