From fa76c4ff3273be6915bb95c2b061d26bf55c88e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Peliz=C3=A4us?= Date: Tue, 27 Oct 2026 22:11:56 +0100 Subject: [PATCH 1/2] github/actions/system-test: Allow turning off debug binaries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This helps testing MicroCloud versions which don't match to the branch the test is running on. Signed-off-by: Julian Pelizäus --- .github/actions/system-test/action.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/actions/system-test/action.yml b/.github/actions/system-test/action.yml index 5563f44e7..626ddf9f3 100644 --- a/.github/actions/system-test/action.yml +++ b/.github/actions/system-test/action.yml @@ -12,6 +12,10 @@ inputs: description: 'Whether to collect Go coverage data for this test' required: false default: 'true' + sideload_debug_binaries: + description: 'Whether to sideload the MicroCloud debug binaries built from this checkout instead of using the installed snap as-is' + required: false + default: 'false' runs: using: composite steps: @@ -48,6 +52,7 @@ runs: go-version-file: 'go.mod' - name: Download system test dependencies + if: ${{ inputs.sideload_debug_binaries == 'true' }} uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 with: name: system-test-deps @@ -63,6 +68,7 @@ runs: if: env.GOCOVERDIR != '' - name: Sideload debug binaries + if: ${{ inputs.sideload_debug_binaries == 'true' }} shell: bash run: | # zizmor: ignore[github-env] set -eux @@ -75,7 +81,7 @@ runs: echo "MICROCLOUDD_DEBUG_PATH=${MICROCLOUDD_DEBUG_PATH}" >> "${GITHUB_ENV}" - name: Strip debug binaries - if: env.GOCOVERDIR == '' + if: ${{ inputs.sideload_debug_binaries == 'true' && env.GOCOVERDIR == '' }} shell: bash run: | set -eux @@ -190,4 +196,4 @@ runs: with: name: coverage-${{ matrix.suite }}-${{ env.TIMESTAMP }} path: ${{ env.GOCOVERDIR }} - if: env.GOCOVERDIR != '' && github.repository == 'canonical/microcloud' + if: env.GOCOVERDIR != '' && inputs.collect_coverage == 'true' && github.repository == 'canonical/microcloud' From 8fda659deeb394b5065df07d2b4f9c8a81514afc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Peliz=C3=A4us?= Date: Tue, 27 Oct 2026 22:19:39 +0100 Subject: [PATCH 2/2] github/workflows/tests: Run weekly tests with MicroCloud 2 and 3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also test the latest/edge snap and use it as the base when injecting the binaries built from (main). For all other versions don't inject binaries. Also only collect coverage for latest/edge. Signed-off-by: Julian Pelizäus --- .github/workflows/tests.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 86c4d3dec..43c482bf1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -189,8 +189,21 @@ jobs: # Both LXD 5.21 and 6 are supported. - "5.21/edge" - "6/edge" - microcloud: ["latest/edge"] + microcloud: + - "latest/edge" + - "3/edge" + - "2/edge" exclude: + # Unsupported: MicroCloud 3 and latest/edge require LXD >= 6. + - microcloud: "latest/edge" + lxd: "5.21/edge" + - microcloud: "3/edge" + lxd: "5.21/edge" + # Exclude the released MicroCloud 2 and 3 combinations for regular development pipelines. + # They test published snaps, not the code in this checkout, so they are only useful on + # the weekly schedule (or on-demand via manual workflow dispatch). + - microcloud: ${{ github.event_name != 'schedule' && github.event_name != 'workflow_dispatch' && '2/edge' }} + - microcloud: ${{ github.event_name != 'schedule' && github.event_name != 'workflow_dispatch' && '3/edge' }} # Exclude LXD 5.21 for regular development pipelines to speed up the result cycle. # MicroCloud edge tests should always run with LXD edge. The LTS edge is tested in the weekly schedule. # Launch the LXD 5.21 tests both for schedules and manual workflow dispatch. @@ -206,7 +219,8 @@ jobs: with: setup_testbed: ${{ matrix.suite != 'terraform_demo' }} setup_terraform: ${{ matrix.suite == 'e2e' || matrix.suite == 'terraform_demo' }} - collect_coverage: ${{ matrix.suite != 'terraform_demo' }} + collect_coverage: ${{ matrix.suite != 'terraform_demo' && matrix.microcloud == 'latest/edge' }} + sideload_debug_binaries: ${{ matrix.microcloud == 'latest/edge' }} system-tests-upgrade: env: