Run Python test suite #1217
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (C) 2021 Sebastian Pipping <sebastian@pipping.org> | |
# Licensed under GNU Affero GPL version 3 or later | |
name: Run Python test suite | |
on: | |
pull_request: | |
push: | |
schedule: | |
- cron: '0 3 * * 5' # Every Friday at 3am | |
jobs: | |
build_and_test: | |
strategy: | |
matrix: | |
python-version: [3.9, 3.13] # oldest and most recent version supported | |
name: Run Python test suite | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install | |
run: |- | |
set -x | |
python3 -m venv venv | |
source venv/bin/activate | |
pip3 install \ | |
--disable-pip-version-check \ | |
--ignore-installed \ | |
pip setuptools wheel | |
pip3 install -r requirements.txt | |
pip3 check | |
diff -u0 \ | |
<(sed -e '/^#/d' -e '/^$/d' requirements.txt | sort -f) \ | |
<(pip3 freeze | sed -e '/^setuptools==/d' -e '/^wheel==/d' | sort -f) | |
- name: Run Python test suite | |
run: |- | |
set -x | |
source venv/bin/activate | |
python3 --version | |
coverage run -m pytest binary_gentoo | |
coverage report |