Skip to content

pytest

pytest #1223

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: [nogt, all]
exclude:
# graph-tool does not work on Windows
- {os: "windows-latest", graphlib: "all"}
# Don't run without graph-tool on Ubuntu and macOS
- {os: "ubuntu-latest", graphlib: "nogt"}
- {os: "macOS-latest", graphlib: "nogt"}
include:
- {os: "macOS-14", graphlib: "all", chemlib: "obabel", python-version: "3.12"}
- {os: "macOS-14", graphlib: "all", chemlib: "rdkit", python-version: "3.12"}
steps:
- uses: actions/checkout@v4
- 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@v4
with:
file: ./coverage.xml
flags: unittests
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}-${{ matrix.chemlib }}-${{ matrix.graphlib }}