-
Notifications
You must be signed in to change notification settings - Fork 40
54 lines (48 loc) · 1.64 KB
/
run-test-suite.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Run the test suite
on:
pull_request:
push:
schedule:
- cron: '0 16 * * 5' # Every Friday 4pm
workflow_dispatch:
jobs:
install_and_run:
name: Run the test suite
strategy:
fail-fast: false
matrix:
python-version: [3.9, 3.13] # no need for anything in between
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: ${{ matrix.python-version }}
- name: Install test dependencies
run: |-
python3 -m venv venv/
source venv/bin/activate
pip3 install \
--disable-pip-version-check \
--no-warn-script-location \
-r requirements.txt
pip3 check
# Ensure that even indirect dependencies are fully pinned
diff -u0 \
<(sed -e '/^#/d' -e '/^$/d' requirements.txt | sort -f) \
<(pip3 freeze | sort -f)
- name: Run the test suite
run: |-
source venv/bin/activate
coverage run -m pytest -v --doctest-modules
coverage report --show-missing | tee coverage.txt
coverage html
- name: Upload HTML coverage report as an artifact
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: "coverage_python_${{ matrix.python-version }}" # .zip
path: |
coverage.txt
htmlcov/
if-no-files-found: error