1+ name : CodeEntropy PR
2+
3+ on :
4+ pull_request :
5+
6+ concurrency :
7+ group : pr-${{ github.ref }}
8+ cancel-in-progress : true
9+
10+ jobs :
11+ unit :
12+ name : Unit tests (py${{ matrix.python-version }} • ${{ matrix.os }})
13+ runs-on : ${{ matrix.os }}
14+ timeout-minutes : 25
15+ strategy :
16+ fail-fast : false
17+ matrix :
18+ os : [ubuntu-24.04, macos-14, windows-2025]
19+ python-version : ["3.12", "3.13", "3.14"]
20+ steps :
21+ - name : Checkout repo
22+ uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
23+
24+ - name : Set up Python ${{ matrix.python-version }}
25+ uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
26+ with :
27+ python-version : ${{ matrix.python-version }}
28+ cache : pip
29+
30+ - name : Install CodeEntropy and its testing dependencies
31+ run : |
32+ python -m pip install --upgrade pip
33+ python -m pip install -e .[testing]
34+
35+ - name : Run unit test suite
36+ run : |
37+ python -m pytest tests/unit -q
38+
39+ regression-quick :
40+ name : Quick regression (py${{ matrix.python-version }} • ${{ matrix.os }})
41+ needs : unit
42+ runs-on : ${{ matrix.os }}
43+ timeout-minutes : 35
44+ strategy :
45+ fail-fast : false
46+ matrix :
47+ os : [ubuntu-24.04, macos-14, windows-2025]
48+ python-version : ["3.12", "3.13", "3.14"]
49+ steps :
50+ - name : Checkout repo
51+ uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
52+
53+ - name : Set up Python ${{ matrix.python-version }}
54+ uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
55+ with :
56+ python-version : ${{ matrix.python-version }}
57+ cache : pip
58+
59+ - name : Cache regression test data downloads
60+ uses : actions/cache@v4
61+ with :
62+ path : .testdata
63+ key : codeentropy-testdata-v1-${{ runner.os }}-py${{ matrix.python-version }}
64+
65+ - name : Install CodeEntropy and its testing dependencies
66+ run : |
67+ python -m pip install --upgrade pip
68+ python -m pip install -e .[testing]
69+
70+ - name : Run quick regression suite (slow excluded)
71+ run : |
72+ python -m pytest tests/regression -q
73+
74+ - name : Upload regression artifacts on failure
75+ if : failure()
76+ uses : actions/upload-artifact@v4
77+ with :
78+ name : quick-regression-failure-${{ matrix.os }}-py${{ matrix.python-version }}
79+ path : |
80+ .testdata/**
81+ tests/regression/**/.pytest_cache/**
82+ /tmp/pytest-of-*/pytest-*/**/config.yaml
83+ /tmp/pytest-of-*/pytest-*/**/codeentropy_stdout.txt
84+ /tmp/pytest-of-*/pytest-*/**/codeentropy_stderr.txt
85+ /tmp/pytest-of-*/pytest-*/**/codeentropy_output.json
86+
87+ docs :
88+ name : Docs build (latest)
89+ runs-on : ubuntu-24.04
90+ timeout-minutes : 25
91+ steps :
92+ - name : Checkout repo
93+ uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
94+
95+ - name : Set up Python 3.14
96+ uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
97+ with :
98+ python-version : " 3.14"
99+ cache : pip
100+
101+ - name : Install python dependencies
102+ run : |
103+ python -m pip install --upgrade pip
104+ python -m pip install -e .[docs]
105+
106+ - name : Build docs
107+ run : |
108+ cd docs
109+ make
110+
111+ pre-commit :
112+ name : Pre-commit
113+ runs-on : ubuntu-24.04
114+ timeout-minutes : 15
115+ steps :
116+ - name : Checkout repo
117+ uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
118+
119+ - name : Set up Python 3.14
120+ uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
121+ with :
122+ python-version : " 3.14"
123+ cache : pip
124+
125+ - name : Install python dependencies
126+ run : |
127+ python -m pip install --upgrade pip
128+ python -m pip install -e .[pre-commit]
129+
130+ - name : Run pre-commit
131+ shell : bash
132+ run : |
133+ pre-commit install
134+ pre-commit run --all-files || {
135+ git status --short
136+ git diff
137+ exit 1
138+ }
0 commit comments