Skip to content

Commit 331fb8f

Browse files
committed
updated gh workflow
1 parent 4bc3160 commit 331fb8f

File tree

1 file changed

+15
-30
lines changed

1 file changed

+15
-30
lines changed

.github/workflows/gh-ci.yaml

Lines changed: 15 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -23,31 +23,21 @@ defaults:
2323
shell: bash -l {0}
2424

2525
jobs:
26-
environment-config:
27-
runs-on: ubuntu-latest
28-
outputs:
29-
stable-python-version: ${{ steps.get-compatible-python.outputs.stable-python }}
30-
python-matrix: ${{ steps.get-compatible-python.outputs.python-versions }}
31-
steps:
32-
- uses: actions/setup-python@v5.3.0
33-
with:
34-
python-version: "3.11"
35-
36-
- id: get-compatible-python
37-
uses: MDAnalysis/mdanalysis-compatible-python@main
38-
with:
39-
release: "latest"
40-
4126
main-tests:
4227
if: "github.repository == 'becksteinlab/basicrta'"
43-
needs: environment-config
4428
runs-on: ${{ matrix.os }}
4529
strategy:
4630
fail-fast: false
4731
matrix:
4832
os: [macOS-latest, ubuntu-latest, windows-latest]
49-
python-version: ${{ fromJSON(needs.environment-config.outputs.python-matrix) }}
33+
python-version: ["3.10", "3.11", "3.12"]
5034
mdanalysis-version: ["latest", "develop"]
35+
# Manually exclude any combinations of the test matrix that can't be run
36+
exclude:
37+
# The latest release of MDANalysis only supports up to Python 3.11
38+
# so we exclude 3.12 from the test matrix (issue #20)
39+
- python-version: "3.12"
40+
mdanalysis-version: "latest"
5141

5242
steps:
5343
- uses: actions/checkout@v4
@@ -58,17 +48,15 @@ jobs:
5848
df -h
5949
ulimit -a
6050
61-
6251
# More info on options: https://github.com/conda-incubator/setup-miniconda
6352
- name: Install conda dependencies
6453
uses: conda-incubator/setup-miniconda@v3
6554
with:
6655
python-version: ${{ matrix.python-version }}
6756
environment-file: devtools/conda-envs/test_env.yaml
6857
add-pip-as-python-dependency: true
69-
#architecture: x64
7058

71-
miniforge-variant: Miniforge3
59+
miniforge-variant: Mambaforge
7260
use-mamba: true
7361
channels: conda-forge, defaults
7462

@@ -77,7 +65,6 @@ jobs:
7765
auto-activate-base: false
7866
show-channel-urls: true
7967

80-
8168
- name: Install MDAnalysis version
8269
uses: MDAnalysis/install-mdanalysis@main
8370
with:
@@ -100,23 +87,22 @@ jobs:
10087
conda info
10188
conda list
10289
103-
10490
- name: Run tests
10591
run: |
106-
pytest -n 2 -v --cov=basicrta --cov-report=xml --color=yes basicrta/tests/
92+
pytest -n auto -v --cov=basicrta --cov-report=xml --color=yes basicrta/tests/
10793
10894
- name: codecov
10995
if: github.repository == 'becksteinlab/basicrta' && github.event_name != 'schedule'
110-
uses: codecov/codecov-action@v3
96+
uses: codecov/codecov-action@v4
11197
with:
11298
file: coverage.xml
11399
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}
100+
token: ${{ secrets.CODECOV_TOKEN }}
114101
verbose: True
115102

116103

117104
pylint_check:
118105
if: "github.repository == 'becksteinlab/basicrta'"
119-
needs: environment-config
120106
runs-on: ubuntu-latest
121107

122108
steps:
@@ -125,7 +111,7 @@ jobs:
125111
- name: Set up Python
126112
uses: actions/setup-python@v4
127113
with:
128-
python-version: ${{ needs.environment-config.outputs.stable-python-version }}
114+
python-version: "3.11"
129115

130116
- name: Install Pylint
131117
run: |
@@ -137,21 +123,20 @@ jobs:
137123
env:
138124
PYLINTRC: .pylintrc
139125
run: |
140-
pylint basicrta --exit-zero
126+
pylint basicrta
141127
142128
143129
pypi_check:
144130
if: "github.repository == 'becksteinlab/basicrta'"
145-
needs: environment-config
146131
runs-on: ubuntu-latest
147132

148133
steps:
149134
- uses: actions/checkout@v4
150135

151-
- name: Set up Python ${{ needs.environment-config.outputs.stable-python-version }}
136+
- name: Set up Python
152137
uses: actions/setup-python@v4
153138
with:
154-
python-version: ${{ needs.environment-config.outputs.stable-python-version }}
139+
python-version: "3.11"
155140

156141
- name: Install dependencies
157142
run: |

0 commit comments

Comments
 (0)