From ab3a16874eb34405ef9d2c22d13d84383efa21b6 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 9 May 2024 21:20:44 +0200 Subject: [PATCH] ci: use Python versions matching Ubuntu versions There is no point to test on different Ubuntu versions, when we use the same Python version on all of them. Use the Python version that is used on the respective Ubuntu version explicitly. The runners ship with the same minor version (3.8, 3.10 etc), but with more recent patch versions than provided by the Ubuntu APT repositories. Signed-off-by: MichaIng --- .github/workflows/test_python.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_python.yml b/.github/workflows/test_python.yml index dd17100ec..25e5b2010 100644 --- a/.github/workflows/test_python.yml +++ b/.github/workflows/test_python.yml @@ -14,15 +14,17 @@ jobs: if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login != github.event.pull_request.base.repo.owner.login strategy: matrix: - dist: ['ubuntu-20.04', 'ubuntu-22.04'] + include: + # https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=python3 + - { dist: 'ubuntu-20.04', python: '3.8.2' } + - { dist: 'ubuntu-22.04', python: '3.10.6' } runs-on: ${{ matrix.dist }} name: "Test on ${{ matrix.dist }}" steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: '3.x' - check-latest: true + python-version: ${{ matrix.python }} - run: sudo apt-mark hold grub-efi-amd64-signed # GRUB does not always find the drive it was configured for - run: sudo apt-get -q update - run: sudo DEBIAN_FRONTEND="noninteractive" apt-get -qq --no-install-recommends dist-upgrade