@@ -23,21 +23,16 @@ jobs:
23
23
python-version : ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
24
24
suffix : [''] # placeholder as an alternative to "-min"
25
25
include :
26
+ # run with minimal versions of dependencies just on one matrix job, where the coverage report will only get uploaded
26
27
- os : ubuntu-latest
27
- # run with minimal versions of dependencies
28
- # this is also used to upload the coverage report
29
- python-version : " 3.8"
28
+ python-version : " 3.8" # update to match lowest supported version
30
29
suffix : -min
31
- exclude :
32
- - os : macos-latest
33
- # exclude this version because its PyYAML version does not work (only in macos)
34
- python-version : " 3.8"
35
30
36
31
runs-on : ${{ matrix.os }}
37
32
env :
38
- # Dev requirement filename, e.g., ci/requirements-py3.9-min.txt or ci/requirements-py3.9.txt
39
- # these are pip-compatible requirements files
40
- REQUIREMENTS : ci/requirements-py${{ matrix.python-version }}${{ matrix.suffix }} .txt
33
+ # pip-compatible requirements file that specifies the minimal versions of dependencies
34
+ # to test against. Makes sense only when running with the "-min" suffix.
35
+ MIN_REQUIREMENTS : ci/requirements-pip-minimal .txt
41
36
42
37
steps :
43
38
# Check out only a limited depth and then pull tags to save time
@@ -49,18 +44,19 @@ jobs:
49
44
- name : Get tags
50
45
run : git fetch --depth=1 origin +refs/tags/*:refs/tags/*
51
46
52
- - name : Install Python ${{ matrix.python-version }}${{ matrix.suffix }}
47
+ - name : Install Python ${{ matrix.python-version }}
53
48
uses : actions/setup-python@v5
54
49
with :
55
50
python-version : ${{ matrix.python-version }}
56
51
57
- - name : Set up test requirements
58
- # sets versions of dependencies in the requirements file first to avoid installing newer versions
52
+ - name : Set up test minimal requirements
53
+ if : matrix.suffix == '-min'
54
+ # install minimal versions of dependencies in the requirements file first to avoid installing newer versions automatically
59
55
run : |
60
- pip install -r ${{ env.REQUIREMENTS }}
56
+ pip install -r ${{ env.MIN_REQUIREMENTS }}
61
57
pip freeze
62
58
63
- - name : Set up environment
59
+ - name : Set up tests environment
64
60
run : |
65
61
pip install .[test]
66
62
pip freeze
73
69
- name : Upload coverage report
74
70
uses : codecov/codecov-action@v4
75
71
# only upload coverage report once, for the minimal version of dependencies
76
- if : matrix.os == 'ubuntu-latest' && matrix.python-version == '3.8' && matrix. suffix == '-min'
72
+ if : matrix.os == 'ubuntu-latest' && matrix.suffix == '-min'
77
73
with :
78
74
fail_ci_if_error : true
79
75
token : ${{ secrets.CODECOV_TOKEN }}
0 commit comments