pytest #919
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: pytest | |
on: | |
push: | |
branches: | |
- "develop" | |
- "master" | |
pull_request: | |
branches: | |
- "*" | |
schedule: | |
# Nightly tests (on master) | |
- cron: "0 0 * * *" | |
defaults: | |
run: | |
# conda setup requires this special shell | |
shell: bash -l {0} | |
jobs: | |
test: | |
name: Test ${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.chemlib }}-${{ matrix.graphlib }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macOS-latest, ubuntu-latest, windows-latest] | |
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] | |
chemlib: [obabel, rdkit] | |
graphlib: [nx, gt] | |
exclude: | |
# graph-tools does not work on Windows | |
- {os: "windows-latest", graphlib: "gt"} | |
# FIXME: Keeps failing in CI for unknown reasons during miniconda setup | |
- {os: "ubuntu-latest", graphlib: "gt", chemlib: "rdkit", python-version: "3.7"} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Info | |
shell: bash | |
run: | | |
uname -a | |
df -h | |
ulimit -a | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
environment-file: devtools/conda-envs/spyrmsd-test-${{ matrix.chemlib }}-${{ matrix.graphlib }}.yaml | |
channels: conda-forge,defaults | |
activate-environment: spyrmsd | |
auto-update-conda: true | |
auto-activate-base: false | |
show-channel-urls: true | |
- name: Install | |
run: | | |
python -m pip install . --no-deps | |
conda list | |
- name: Test | |
run: | | |
pytest -v --benchmark --cov=spyrmsd --cov-report=xml --color=yes tests/ | |
- name: CodeCov | |
uses: codecov/codecov-action@v3 | |
with: | |
file: ./coverage.xml | |
flags: unittests | |
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}-${{ matrix.chemlib }}-${{ matrix.graphlib }} |