Skip to content

Tests

Tests #1027

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.9
- 3.8
- 3.7
INTEGRATIONS: [""]
include:
- CONDA_PY: 3.9
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@v2
with:
files: ./cov.xml