Skip to content

Tests

Tests #1188

Workflow file for this run

name: "Tests"
on:
pull_request:
branches:
- main
- stable
push:
branches:
- main
tags:
- "v*"
schedule:
- cron: "25 5 * * *"
defaults:
run:
shell: bash -l {0}
jobs:
test_suite:
runs-on: ubuntu-latest
name: "Unit tests"
strategy:
matrix:
CONDA_PY:
- "3.12"
- "3.11"
- "3.10"
INTEGRATIONS: [""]
include:
- CONDA_PY: "3.12"
INTEGRATIONS: 'all-optionals'
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
- uses: actions/setup-python@v2
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.CONDA_PY }}
- name: "Install testing tools"
run: python -m pip install -r ./devtools/tests_require.txt
- name: "Install integrations"
if: matrix.INTEGRATIONS == 'all-optionals'
run: conda install -c conda-forge -y openmm openmmtools mdtraj
- name: "Install"
run: |
conda install pip
python -m pip install -e .
- name: "Versions"
run: conda list
- name: "Autorelease check"
env:
PR_BRANCH: ${{ github.event.pull_request.base.ref }}
REF: ${{ github.ref }}
EVENT: ${{ github.event_name }}
run: |
if [ "$EVENT" != "pull_request" ]; then
BRANCH=$REF
else
BRANCH=$PR_BRANCH
fi
python autorelease_check.py --branch $BRANCH --even ${EVENT}
- name: "Unit tests"
env:
PY_COLORS: "1"
run: |
python -c "import paths_cli"
py.test -vv --cov --cov-report xml:cov.xml
- uses: codecov/codecov-action@v4
with:
files: ./cov.xml
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}