Skip to content
Open
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
92 changes: 63 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,38 @@ on:
required: false
type: string
default: "1.27.2"
# Optional overrides of the e2e runners and environment versions. An
# empty value selects the default in vm_test.yml.
runners:
type: string
default: ''
runc_version:
type: string
default: ''
containerd_version:
type: string
default: ''
cni_version:
type: string
default: ''
nerdctl_version:
type: string
default: ''
crictl_version:
type: string
default: ''
firecracker_version:
type: string
default: ''
cloud_hypervisor_version:
type: string
default: ''
solo5_version:
type: string
default: ''
hluk_version:
type: string
default: ''

permissions:
contents: read
Expand Down Expand Up @@ -68,21 +100,22 @@ jobs:
uses: ./.github/workflows/vm_test.yml
with:
# Run the e2e suite from the base branch, so a PR cannot silently weaken
# the tests that gate its own binary. Changes under tests/ are exercised
# with the PR's own test code by the "vm_test_head" step. Falls back to the
# the tests that gate its own binary. Changes to the e2e code or its
# environment are exercised by the "vm_test_head" step. Falls back to the
# caller ref for non-PR runs (nightly/release), where base.sha is empty.
ref: ${{ github.event.pull_request.base.sha || inputs.ref }}
go_version: ${{ inputs.go_version }}
runner-archs: '["amd64", "arm64"]'
runc_version: '1.3.0'
containerd_version: '2.3.7'
cni_version: '1.7.1'
nerdctl_version: '2.1.3'
crictl_version: 'v1.30.0'
firecracker_version: 'v1.7.0'
cloud_hypervisor_version: 'v50.0'
solo5_version: 'v0.9.3'
hyperlight_unikraft_version: 'v0.18.0'
# Only set by manual dispatches. PR runs leave them empty, so the base
# branch's e2e code runs with vm_test.yml's default versions.
runners: ${{ inputs.runners }}
runc_version: ${{ inputs.runc_version }}
containerd_version: ${{ inputs.containerd_version }}
cni_version: ${{ inputs.cni_version }}
nerdctl_version: ${{ inputs.nerdctl_version }}
crictl_version: ${{ inputs.crictl_version }}
firecracker_version: ${{ inputs.firecracker_version }}
cloud_hypervisor_version: ${{ inputs.cloud_hypervisor_version }}
solo5_version: ${{ inputs.solo5_version }}
hluk_version: ${{ inputs.hluk_version }}
secrets: inherit

kind_test:
Expand All @@ -98,9 +131,10 @@ jobs:
secrets: inherit

# The vm_test job above runs the base branch's e2e code. In order to also
# test changes in the e2e testing code, re-run the vm_test with the changed
# e2e test code. However, do that only when a change in the files that affect
# the e2e tests ("tests/*", "Makefile", "scripts/dm_create.sh") has taken place.
# test changes in the e2e testing code or environment, re-run the vm_test
# with the PR's e2e code. However, do that only when a change in the files
# that affect the e2e tests ("tests/*", "Makefile", "script/dm_create.sh",
# ".github/workflows/vm_test.yml") has taken place.
detect-test-changes:
if: ${{ github.event_name == 'pull_request' && inputs.skip-build != 'yes' }}
name: Detect test changes
Expand All @@ -126,7 +160,12 @@ jobs:
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
});
const roots = ['tests/', 'Makefile', 'script/dm_create.sh'];
const roots = [
'tests/',
'Makefile',
'script/dm_create.sh',
'.github/workflows/vm_test.yml',
];
const changed = files.some(f => roots.some(r => f.filename.startsWith(r)));
core.setOutput('tests_changed', changed ? 'yes' : 'no');

Expand All @@ -136,16 +175,11 @@ jobs:
name: E2E test (PR test code)
uses: ./.github/workflows/vm_test.yml
with:
ref: ${{ inputs.ref }}
go_version: ${{ inputs.go_version }}
runner-archs: '["amd64", "arm64"]'
runc_version: '1.3.0'
containerd_version: '2.3.7'
cni_version: '1.7.1'
nerdctl_version: '2.1.3'
crictl_version: 'v1.30.0'
firecracker_version: 'v1.7.0'
cloud_hypervisor_version: 'v50.0'
solo5_version: 'v0.9.3'
hyperlight_unikraft_version: 'v0.12.1'
# Check out the merge commit (github.sha on pull_request events), as this
# is where GitHub loaded vm_test.yml from. With the PR's head, a branch
# that predates a change in main's vm_test.yml would run its old tests
# against main's environment. No other versions are forwarded to
# vm_test_head, since it only runs on PRs and the only way to override
# them in that context is to change the default versions.
ref: ${{ github.sha }}
secrets: inherit
62 changes: 62 additions & 0 deletions .github/workflows/ci_devel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,58 @@ on:
required: false
default: "no"
type: string
# The e2e runners and environment versions. Leave a field empty to use
# the default in vm_test.yml.
runners:
description: 'Runners for the e2e tests, as a JSON list (e.g. ["ubuntu-22.04"])'
required: false
default: ''
type: string
runc_version:
description: 'runc version for the e2e tests (e.g. 1.3.0)'
required: false
default: ''
type: string
containerd_version:
description: 'containerd version for the e2e tests (e.g. 2.3.7)'
required: false
default: ''
type: string
cni_version:
description: 'CNI plugins version for the e2e tests (e.g. 1.7.1)'
required: false
default: ''
type: string
nerdctl_version:
description: 'nerdctl version for the e2e tests (e.g. 2.1.3)'
required: false
default: ''
type: string
crictl_version:
description: 'crictl version for the e2e tests (e.g. v1.30.0)'
required: false
default: ''
type: string
firecracker_version:
description: 'Firecracker version for the e2e tests (e.g. v1.7.0)'
required: false
default: ''
type: string
cloud_hypervisor_version:
description: 'Cloud Hypervisor version for the e2e tests (e.g. v50.0)'
required: false
default: ''
type: string
solo5_version:
description: 'Solo5 version for the e2e tests (e.g. v0.9.3)'
required: false
default: ''
type: string
hluk_version:
description: 'hyperlight-unikraft version for the e2e tests (e.g. v0.18.0)'
required: false
default: ''
type: string

permissions:
contents: read
Expand All @@ -29,4 +81,14 @@ jobs:
ref: ${{ github.sha }}
skip-build: ${{ inputs.skip_build }}
skip-lint: ${{ inputs.skip_lint }}
runners: ${{ inputs.runners }}
runc_version: ${{ inputs.runc_version }}
containerd_version: ${{ inputs.containerd_version }}
cni_version: ${{ inputs.cni_version }}
nerdctl_version: ${{ inputs.nerdctl_version }}
crictl_version: ${{ inputs.crictl_version }}
firecracker_version: ${{ inputs.firecracker_version }}
cloud_hypervisor_version: ${{ inputs.cloud_hypervisor_version }}
solo5_version: ${{ inputs.solo5_version }}
hluk_version: ${{ inputs.hluk_version }}
secrets: inherit
12 changes: 0 additions & 12 deletions .github/workflows/ci_nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,6 @@ jobs:
needs: [build]
name: E2E test
uses: ./.github/workflows/vm_test.yml
with:
runner-archs: '["amd64", "arm64"]'
runc_version: '1.3.0'
containerd_version: '2.3.7'
cni_version: '1.7.1'
nerdctl_version: '2.1.3'
crictl_version: 'v1.30.0'
firecracker_version: 'v1.7.0'
cloud_hypervisor_version: 'v50.0'
solo5_version: 'v0.9.3'
hyperlight_unikraft_version: 'v0.18.0'
go_version: "1.27.2"

kind_test:
needs: [build]
Expand Down
Loading