Skip to content

Update pre-commit hooks and add CI action #852

Update pre-commit hooks and add CI action

Update pre-commit hooks and add CI action #852

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.7", "3.8", "3.9", "3.10", "3.11"]
chemlib: [obabel, rdkit]
graphlib: [nx, gt]
# graph-tools does not work on Windows
exclude:
- {os: "windows-latest", graphlib: "gt"}
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 }}