Skip to content

pytest

pytest #172

Workflow file for this run

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.9", "3.10", "3.11", "3.12"]
chemlib: [obabel, rdkit]
graphlib: [nx, gt, rx, all]
exclude:
# graph-tools does not work on Windows
- {os: "windows-latest", graphlib: "gt"}
- {os: "windows-latest", graphlib: "all"}
- {graphlib: "all", chemlib: "obabel"}
include:
- {os: "macOS-14", graphlib: "gt", chemlib: "obabel", python-version: "3.12"}
- {os: "macOS-14", graphlib: "nx", chemlib: "rdkit", python-version: "3.12"}
steps:
- uses: actions/checkout@v3
- name: Info
shell: bash
run: |
uname -a
df -h
ulimit -a
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
environment-file: devtools/conda-envs/spyrmsd-test-${{ matrix.chemlib }}-${{ matrix.graphlib }}.yaml
miniforge-version: "latest"
activate-environment: spyrmsd
miniforge-variant: Mambaforge
use-mamba: true
auto-update-conda: true
auto-activate-base: false
show-channel-urls: true
- name: Install
run: |
python -m pip install . --no-deps
mamba info
mamba 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 }}