@@ -17,12 +17,13 @@ jobs:
1717 matrix :
1818 os : [ubuntu-24.04, macos-15, windows-2025]
1919 python-version : ["3.12", "3.13", "3.14"]
20+
2021 steps :
2122 - name : Checkout
22- uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
23+ uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
2324
2425 - name : Set up Python ${{ matrix.python-version }}
25- uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
26+ uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
2627 with :
2728 python-version : ${{ matrix.python-version }}
2829 cache : pip
@@ -35,17 +36,50 @@ jobs:
3536 - name : Pytest (unit) • ${{ matrix.os }}, ${{ matrix.python-version }}
3637 run : python -m pytest tests/unit
3738
39+ discover-systems :
40+ name : Discover regression systems
41+ runs-on : ubuntu-24.04
42+ outputs :
43+ systems : ${{ steps.set-systems.outputs.systems }}
44+
45+ steps :
46+ - name : Checkout
47+ uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
48+
49+ - name : Set up Python 3.14
50+ uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
51+ with :
52+ python-version : " 3.14"
53+ cache : pip
54+
55+ - name : Install testing dependencies
56+ run : |
57+ python -m pip install --upgrade pip
58+ python -m pip install -e .[testing]
59+
60+ - name : Discover systems
61+ id : set-systems
62+ run : |
63+ SYSTEMS=$(python -m tests.regression.list_systems)
64+ echo "systems=$SYSTEMS" >> $GITHUB_OUTPUT
65+
3866 regression-quick :
39- name : Regression (quick)
40- needs : unit
67+ name : Regression (fast) • ${{ matrix.system }}
68+ needs : [ unit, discover-systems]
4169 runs-on : ubuntu-24.04
4270 timeout-minutes : 35
71+
72+ strategy :
73+ fail-fast : false
74+ matrix :
75+ system : ${{ fromJson(needs.discover-systems.outputs.systems) }}
76+
4377 steps :
4478 - name : Checkout
45- uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
79+ uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
4680
4781 - name : Set up Python 3.14
48- uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
82+ uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
4983 with :
5084 python-version : " 3.14"
5185 cache : pip
@@ -54,28 +88,31 @@ jobs:
5488 uses : actions/cache@v4
5589 with :
5690 path : .testdata
57- key : codeentropy-testdata-v1- ${{ runner.os }}-py3.14
91+ key : codeentropy-testdata-${{ runner.os }}-py314
5892
59- - name : Install ( testing)
93+ - name : Install testing dependencies
6094 run : |
6195 python -m pip install --upgrade pip
6296 python -m pip install -e .[testing]
6397
64- - name : Pytest (regression quick)
65- run : python -m pytest tests/regression
98+ - name : Run fast regression tests (per system)
99+ run : |
100+ python -m pytest tests/regression \
101+ -m "not slow" \
102+ -n auto \
103+ --dist=loadscope \
104+ -k "${{ matrix.system }}" \
105+ -vv \
106+ --durations=20
66107
67108 - name : Upload artifacts (failure)
68109 if : failure()
69110 uses : actions/upload-artifact@v4
70111 with :
71- name : quick-regression-failure
112+ name : quick-regression-failure-${{ matrix.system }}
72113 path : |
73114 .testdata/**
74- tests/regression/**/.pytest_cache/**
75- /tmp/pytest-of-*/pytest-*/**/config.yaml
76- /tmp/pytest-of-*/pytest-*/**/codeentropy_stdout.txt
77- /tmp/pytest-of-*/pytest-*/**/codeentropy_stderr.txt
78- /tmp/pytest-of-*/pytest-*/**/codeentropy_output.json
115+ /tmp/pytest-of-*/pytest-*/**
79116
80117 docs :
81118 name : Docs
93130 python-version : " 3.14"
94131 cache : pip
95132
96- - name : Install
133+ - name : Install docs dependencies
97134 run : |
98135 python -m pip install --upgrade pip
99136 python -m pip install -e .[docs]
@@ -114,23 +151,23 @@ jobs:
114151 name : Pre-commit
115152 runs-on : ubuntu-24.04
116153 timeout-minutes : 15
154+
117155 steps :
118156 - name : Checkout
119- uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
157+ uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
120158
121159 - name : Set up Python 3.14
122- uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
160+ uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
123161 with :
124162 python-version : " 3.14"
125163 cache : pip
126164
127- - name : Install ( pre-commit)
165+ - name : Install pre-commit dependencies
128166 run : |
129167 python -m pip install --upgrade pip
130168 python -m pip install -e .[pre-commit]
131169
132170 - name : Run pre-commit
133- shell : bash
134171 run : |
135172 pre-commit install
136173 pre-commit run --all-files || {
@@ -144,8 +181,9 @@ jobs:
144181 needs : unit
145182 runs-on : ubuntu-24.04
146183 timeout-minutes : 30
184+
147185 steps :
148- - name : Checkout repo
186+ - name : Checkout
149187 uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
150188
151189 - name : Set up Python 3.14
@@ -154,20 +192,20 @@ jobs:
154192 python-version : " 3.14"
155193 cache : pip
156194
157- - name : Install ( testing)
195+ - name : Install testing dependencies
158196 run : |
159197 python -m pip install --upgrade pip
160198 python -m pip install -e .[testing]
161199
162- - name : Run unit test suite with coverage
200+ - name : Run coverage
163201 run : |
164202 pytest tests/unit \
165203 --cov CodeEntropy \
166204 --cov-report term-missing \
167205 --cov-report xml \
168206 -q
169207
170- - name : Upload to Coveralls
208+ - name : Upload coverage to Coveralls
171209 uses : coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e
172210 with :
173211 github-token : ${{ secrets.GITHUB_TOKEN }}
0 commit comments