Skip to content

Commit

Permalink
Update CI (#66)
Browse files Browse the repository at this point in the history
* fix #65 
* Update CI: manually set the test matrix for MDAnalysis
* Update pyproject.toml
* Update CHANGELOG.md
* Update CHANGELOG.md
  • Loading branch information
IAlibay authored Apr 29, 2024
1 parent 3839a76 commit 7aa5bd7
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 33 deletions.
50 changes: 20 additions & 30 deletions .github/workflows/gh-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,35 +23,25 @@ defaults:
shell: bash -l {0}

jobs:
environment-config:
runs-on: ubuntu-latest
outputs:
stable-python-version: ${{ steps.get-compatible-python.outputs.stable-python }}
latest-python-version: ${{ steps.get-compatible-python.outputs.latest-python }}
python-matrix: ${{ steps.get-compatible-python.outputs.python-versions }}
steps:
- uses: actions/setup-python@v4
with:
python-version: "3.11"

- id: get-compatible-python
uses: MDAnalysis/mdanalysis-compatible-python@main
with:
release: "latest"

main-tests:
if: "github.repository == 'MDAnalysis/mdaencore'"
needs: environment-config
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macOS-latest, ubuntu-latest, windows-latest, macos-14]
python-version: ${{ fromJSON(needs.environment-config.outputs.python-matrix) }}
# macos-13 is x86_64 and macos-14 is arm64
os: [ubuntu-latest, windows-latest, macos-14, macos-13]
python-version: ["3.10", "3.11", "3.12"]
mdanalysis-version: ["latest", "develop"]
# Manually exclude any combinations of the test matrix that can't be run
exclude:
# The latest release of MDAnalysis only supports up to Python 3.11
# so we exclude 3.12 from the test matrix (issue #68)
- python-version: "3.12"
mdanalysis-version: "latest"

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -63,7 +53,7 @@ jobs:
# More info on options: https://github.com/conda-incubator/setup-miniconda
- name: Install conda dependencies
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
environment-file: devtools/conda-envs/test_env.yaml
Expand Down Expand Up @@ -108,29 +98,30 @@ jobs:
- name: Run tests
run: |
pytest -n 2 -v --cov=mdaencore --cov-report=xml --color=yes --pyargs mdaencore
pytest -n auto -v --cov=mdaencore --cov-report=xml --color=yes --pyargs mdaencore
- name: codecov
if: github.repository == 'MDAnalysis/mdaencore' && github.event_name != 'schedule'
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
file: coverage.xml
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}
token: ${{ secrets.CODECOV_TOKEN }}
verbose: True
fail_ci_if_error: True


pylint_check:
if: "github.repository == 'MDAnalysis/mdaencore'"
needs: environment-config
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ needs.environment-config.outputs.stable-python-version }}
python-version: "3.11"

- name: Install Pylint
run: |
Expand All @@ -147,16 +138,15 @@ jobs:
pypi_check:
if: "github.repository == 'MDAnalysis/mdaencore'"
needs: environment-config
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python ${{ needs.environment-config.outputs.stable-python-version }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ needs.environment-config.outputs.stable-python-version }}
python-version: "3.11"

- name: Install dependencies
run: |
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ The rules for this file:

### Changed
- Update CI and wheel deployment to include macos-arm64 and py3.12 (PR #63)
- Minimum Python version has been raised to 3.10 (PR #66)
- Minimum MDAnalysis version has been raised to 2.1.0 (PR #66)

### Deprecated
<!-- Soon-to-be removed features -->
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ classifiers = [
"Operating System :: POSIX",
"Programming Language :: C",
"Programming Language :: Python",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",
"Topic :: Software Development :: Libraries :: Python Modules",
]
readme = "README.md"
requires-python = ">=3.9"
requires-python = ">=3.10"
dependencies = [
"MDAnalysis>=2.0.0",
"MDAnalysis>=2.1.0",
"joblib",
"numpy",
"scipy",
Expand Down

0 comments on commit 7aa5bd7

Please sign in to comment.