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' 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: