Start initial flow for downgrade tests

This commit is contained in:
MKLeb 2023-07-31 18:08:38 -04:00 committed by Pedro Algarvio
parent 8a0e2ec338
commit 7e9dc8ca63
4 changed files with 18 additions and 6 deletions

View file

@ -238,7 +238,7 @@ jobs:
SKIP_INITIAL_GH_ACTIONS_FAILURES: "1"
run: |
sudo -E nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.test-chunk }} \
${{ contains(matrix.test-chunk, 'upgrade') && format('--prev-version {0}', matrix.version) || ''}}
${{ matrix.version && format('--prev-version {0}', matrix.version) || ''}}
- name: Run Package Tests
env:
@ -252,7 +252,7 @@ jobs:
COVERAGE_CONTEXT: ${{ inputs.distro-slug }}
run: |
sudo -E nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.test-chunk }} \
${{ contains(matrix.test-chunk, 'upgrade') && format('--prev-version {0}', matrix.version) || ''}}
${{ matrix.version && format('--prev-version {0}', matrix.version) || ''}}
- name: Fix file ownership
run: |

View file

@ -268,13 +268,13 @@ jobs:
run: |
tools --timestamps --timeout-secs=1800 vm testplan --skip-requirements-install \
--nox-session=${{ inputs.nox-session }} ${{ inputs.distro-slug }} -- ${{ matrix.test-chunk }} \
${{ contains(matrix.test-chunk, 'upgrade') && format('--prev-version {0}', matrix.version) || ''}}
${{ matrix.version && format('--prev-version {0}', matrix.version) || ''}}
- name: Run Package Tests
run: |
tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \
--nox-session=${{ inputs.nox-session }} --rerun-failures ${{ inputs.distro-slug }} -- ${{ matrix.test-chunk }} \
${{ contains(matrix.test-chunk, 'upgrade') && format('--prev-version {0}', matrix.version) || ''}}
${{ matrix.version && format('--prev-version {0}', matrix.version) || ''}}
- name: Download Test Run Artifacts
id: download-artifacts-from-vm

View file

@ -1797,6 +1797,16 @@ def test_pkgs_onedir(session):
"--no-uninstall",
"pkg/tests/upgrade/",
],
"downgrade": [
"--downgrade",
"--no-uninstall",
"pkg/tests/downgrade/",
],
"downgrade-classic": [
"--downgrade",
"--no-uninstall",
"pkg/tests/downgrade/",
],
"download-pkgs": [
"--download-pkgs",
"pkg/tests/download/",

View file

@ -715,6 +715,7 @@ def pkg_matrix(
# we allow for 3006.0 jobs to run, because then
# we will have arm64 onedir packages to upgrade from
sessions.append("upgrade")
sessions.append("downgrade")
# TODO: Remove this block when we reach version 3009.0, we will no longer be testing upgrades from classic packages
if (
distro_slug
@ -729,12 +730,13 @@ def pkg_matrix(
):
# Packages for these OSs where never built for classic previously
sessions.append("upgrade-classic")
sessions.append("downgrade-classic")
for session in sessions:
versions: list[str | None] = [None]
if session == "upgrade":
if session in ("upgrade", "downgrade"):
versions = [str(version) for version in testing_releases]
elif session == "upgrade-classic":
elif session in ("upgrade-classic", "downgrade-classic"):
versions = [
str(version)
for version in testing_releases