Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update CI matrix #70

Merged
merged 3 commits into from
May 2, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 16 additions & 23 deletions .github/workflows/gh-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,23 @@ defaults:
shell: bash -l {0}

jobs:
environment-config:
runs-on: ubuntu-latest
outputs:
stable-python-version: ${{ steps.get_python_version.outputs.python-version }}
steps:
- uses: actions/checkout@v3

- id: get-python-version
uses: MDAnalysis/get-latest-python-version@main
with:
last-n-minor-release: 1

main-tests:
if: "github.repository == 'Becksteinlab/propkatraj'"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macOS-latest, ubuntu-latest, windows-latest]
python-version: ["3.9", "3.10", "3.11"]
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 #69)
- python-version: "3.12"
mdanalysis-version: "latest"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -54,15 +47,17 @@ jobs:
ulimit -a

- 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/environment.yml
add-pip-as-python-dependency: true
architecture: x64

miniforge-variant: Mambaforge
use-mamba: true
channels: conda-forge, defaults

activate-environment: propkatraj-test
auto-update-conda: true
auto-activate-base: false
Expand Down Expand Up @@ -95,12 +90,12 @@ jobs:

- name: Run tests
run: |
pytest -n 2 --cov=propkatraj --cov-report=xml -v --color=yes propkatraj/tests/
pytest -n auto --cov=propkatraj --cov-report=xml -v --color=yes propkatraj/tests/

- name: codecov
if: ${{ github.repository == 'Becksteinlab/propkatraj'
&& github.event_name != 'schedule' }}
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.xml
Expand All @@ -109,7 +104,6 @@ jobs:

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

steps:
Expand All @@ -118,7 +112,7 @@ jobs:
- 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 @@ -133,16 +127,15 @@ jobs:

pypi_check:
if: "github.repository == 'Becksteinlab/propkatraj'"
needs: environment-config
runs-on: ubuntu-latest

steps:
- 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
Loading