Skip to content

Commit e141b7d

Browse files
authored
Merge pull request #182 from CCPBioSim/181-use-latest-for-mdanalysis
Separate MDAnalysis Compatibility Workflow, Add OS Matrix, and Pin MDAnalysis Version
2 parents d964441 + 013b54a commit e141b7d

File tree

2 files changed

+57
-47
lines changed

2 files changed

+57
-47
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: MDAnalysis Compatibility
2+
3+
on:
4+
schedule:
5+
- cron: '0 8 * * 1' # Weekly Monday checks
6+
workflow_dispatch:
7+
8+
jobs:
9+
mdanalysis-compatibility:
10+
name: MDAnalysis Compatibility Tests
11+
runs-on: ${{ matrix.os }}
12+
13+
strategy:
14+
matrix:
15+
os: [ubuntu-24.04, windows-2025, macos-15]
16+
python-version: ["3.11", "3.12", "3.13", "3.14"]
17+
mdanalysis-version: ["2.10.0"]
18+
19+
steps:
20+
- name: Checkout repo
21+
uses: actions/checkout@v5.0.0
22+
23+
- name: Set up Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v6.0.0
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
28+
- name: Install dependencies with MDAnalysis ${{ matrix.mdanalysis-version }}
29+
run: |
30+
pip install --upgrade pip
31+
pip install -e .[testing]
32+
33+
if [ "${{ matrix.mdanalysis-version }}" = "latest" ]; then
34+
pip install MDAnalysis
35+
else
36+
pip install "MDAnalysis==${{ matrix.mdanalysis-version }}"
37+
fi
38+
39+
- name: Run compatibility tests
40+
run: pytest --cov CodeEntropy --cov-report=term-missing --cov-append
41+
42+
- name: Create Issue on Failure
43+
if: failure()
44+
uses: JasonEtco/create-an-issue@v2
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47+
PYTHON_VERSION: ${{ matrix.python-version }}
48+
MDA_VERSION: ${{ matrix.mdanalysis-version }}
49+
RUN_NUMBER: ${{ github.run_number }}
50+
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
51+
with:
52+
filename: .github/workflows/mdanalysis-compatibility-failure.md
53+
update_existing: true
54+
search_existing: open

.github/workflows/project-ci.yaml

Lines changed: 3 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ on:
66
pull_request:
77
schedule:
88
- cron: '0 8 * * 1'
9-
9+
workflow_dispatch:
10+
1011
jobs:
1112
tests:
1213
name: Run tests
@@ -67,49 +68,4 @@ jobs:
6768
- name: Run pre-commit
6869
run: |
6970
pre-commit install
70-
pre-commit run --all-files || ( git status --short ; git diff ; exit 1 )
71-
72-
mdanalysis-compatibility:
73-
if: github.event_name == 'schedule'
74-
runs-on: ubuntu-24.04
75-
timeout-minutes: 15
76-
strategy:
77-
matrix:
78-
python-version: ["3.11", "3.12", "3.13", "3.14"]
79-
mdanalysis-version: ["2.9.0", "latest"]
80-
name: MDAnalysis Compatibility Tests
81-
steps:
82-
- name: Checkout repo
83-
uses: actions/checkout@v5.0.0
84-
85-
- name: Set up Python ${{ matrix.python-version }}
86-
uses: actions/setup-python@v6.0.0
87-
with:
88-
python-version: ${{ matrix.python-version }}
89-
90-
- name: Install dependencies with MDAnalysis ${{ matrix.mdanalysis-version }}
91-
run: |
92-
pip install --upgrade pip
93-
pip install -e .[testing]
94-
if [ "${{ matrix.mdanalysis-version }}" = "latest" ]; then
95-
pip install MDAnalysis
96-
else
97-
pip install "MDAnalysis==${{ matrix.mdanalysis-version }}"
98-
fi
99-
100-
- name: Run compatibility tests
101-
run: pytest --cov CodeEntropy --cov-report=term-missing --cov-append
102-
103-
- name: Create Issue on Failure
104-
if: failure()
105-
uses: JasonEtco/create-an-issue@v2
106-
env:
107-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
108-
PYTHON_VERSION: ${{ matrix.python-version }}
109-
MDA_VERSION: ${{ matrix.mdanalysis-version }}
110-
RUN_NUMBER: ${{ github.run_number }}
111-
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
112-
with:
113-
filename: .github/workflows/mdanalysis-compatibility-failure.md
114-
update_existing: true
115-
search_existing: open
71+
pre-commit run --all-files || ( git status --short ; git diff ; exit 1 )

0 commit comments

Comments
 (0)