Skip to content

Commit 7dba3eb

Browse files
committed
ci: update workflows for unit, quick regression, and weekly full regression:
Run unit tests across all supported OS and Python versions, add quick regression suite to PRs with .testdata caching, and configure weekly workflow to run full regression including slow tests. Simplify docs builds to latest environment.
1 parent b4891b2 commit 7dba3eb

7 files changed

Lines changed: 302 additions & 145 deletions

File tree

.github/workflows/daily.yaml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: CodeEntropy Daily Checks
2+
3+
on:
4+
schedule:
5+
- cron: '0 8 * * 1-5'
6+
workflow_dispatch:
7+
8+
concurrency:
9+
group: daily-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
unit:
14+
name: Daily unit tests
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
os: [ubuntu-24.04, windows-2025, macos-15]
20+
python-version: ["3.12", "3.13", "3.14"]
21+
timeout-minutes: 30
22+
steps:
23+
- name: Checkout repo
24+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
25+
26+
- name: Set up Python ${{ matrix.python-version }}
27+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
28+
with:
29+
python-version: ${{ matrix.python-version }}
30+
cache: pip
31+
32+
- name: Install CodeEntropy and its testing dependencies
33+
run: |
34+
pip install --upgrade pip
35+
pip install -e .[testing]
36+
37+
- name: Run unit test suite
38+
run: pytest tests/unit -q
39+
40+
coverage:
41+
name: Coverage (ubuntu, latest python)
42+
runs-on: ubuntu-24.04
43+
timeout-minutes: 30
44+
steps:
45+
- name: Checkout repo
46+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
47+
48+
- name: Set up Python 3.14
49+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
50+
with:
51+
python-version: "3.14"
52+
cache: pip
53+
54+
- name: Install CodeEntropy and its testing dependencies
55+
run: |
56+
pip install --upgrade pip
57+
pip install -e .[testing]
58+
59+
- name: Run unit test suite with coverage
60+
run: pytest tests/unit --cov CodeEntropy --cov-report term-missing --cov-report xml -q
61+
62+
- name: Coveralls GitHub Action
63+
uses: coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e # v2.3.7
64+
with:
65+
github-token: ${{ secrets.GITHUB_TOKEN }}
66+
file: coverage.xml

.github/workflows/mdanalysis-compatibility-failure.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/workflows/mdanalysis-compatibility.yaml

Lines changed: 0 additions & 49 deletions
This file was deleted.

.github/workflows/pr.yaml

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
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+
}

.github/workflows/project-ci.yaml

Lines changed: 0 additions & 85 deletions
This file was deleted.

0 commit comments

Comments
 (0)