Skip to content

Commit

Permalink
ci: use Python versions matching Ubuntu versions
Browse files Browse the repository at this point in the history
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 <micha@dietpi.com>
  • Loading branch information
MichaIng committed May 9, 2024
1 parent e2ef55d commit ab3a168
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/test_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ab3a168

Please sign in to comment.