CI #524
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- "main" | |
pull_request: | |
branches: | |
- "main" | |
schedule: | |
# 3 am Tuesdays and Fridays | |
- cron: "0 3 * * 2,5" | |
concurrency: | |
group: "${{ github.ref }}-${{ github.head_ref }}" | |
cancel-in-progress: true | |
jobs: | |
test: | |
name: "Test on ${{ matrix.os }}, Python ${{ matrix.python-version }}" | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macOS-latest, ubuntu-latest, windows-latest] | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
env_file: [env, ] | |
include: | |
- name: minimum_requirements | |
os: ubuntu-latest | |
python-version: 3.9 | |
env_file: min | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Additional info about the build | |
shell: bash | |
run: | | |
uname -a | |
df -h | |
ulimit -a | |
# More info on options: https://github.com/conda-incubator/setup-miniconda | |
# An environment for the minimum versions | |
- name: setup micromamba | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: devtools/conda-envs/test_${{ matrix.env_file }}.yaml | |
environment-name: test | |
create-args: >- | |
python=${{ matrix.python-version }} | |
- name: Install package | |
# conda setup requires this special shell | |
shell: bash -l {0} | |
run: | | |
python -m pip install . --no-deps | |
pip list | |
micromamba list | |
- name: Run tests | |
# conda setup requires this special shell | |
shell: bash -l {0} | |
run: | | |
pytest -v --cov=membrane_curvature --cov-report=xml --color=yes membrane_curvature/tests/ | |
- name: codecov | |
if: ${{ github.repository == 'MDAnalysis/membrane-curvature' | |
&& github.event_name == 'pull_request' }} | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage.xml | |
flags: unittests | |
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }} | |
fail_ci_if_error: True | |
verbose: True | |
upstream_develop: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
latest-python : ["3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.latest-python }} | |
- name: pip install membrane-curvature | |
run: | | |
pip install git+https://github.com/MDAnalysis/mdanalysis.git@develop#subdirectory=package | |
python -m pip install . | |
- name: install pytest | |
run: | | |
python -m pip install pytest | |
- name: run tests | |
run: | | |
pytest --disable-pytest-warnings membrane_curvature/tests/ |