-
Notifications
You must be signed in to change notification settings - Fork 51
95 lines (92 loc) · 2.86 KB
/
Copy pathtests.yml
File metadata and controls
95 lines (92 loc) · 2.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: "Tests"
on:
pull_request:
types: ['opened', 'synchronize', 'reopened', 'ready_for_review']
branches:
- master
- stable
push:
branches:
- master
tags:
- "v*"
schedule:
- cron: "0 4 * * *"
defaults:
run:
shell: bash -l {0}
jobs:
tests:
runs-on: ubuntu-latest
name: "Tests"
strategy:
# NOTE: When changing the test matrix:
# * Update the after_n_builds in codecov.yml to match the number of
# builds in the matrix
# * You may need to create another example run for the notebook tests
# (see examples/ipynbtests.sh; examples/prep_example_data.py). This
# is because Python internals (usually bytecode, which is saved in
# CVs) can differ between minor Python versions.
matrix:
CONDA_PY:
- "3.13"
- "3.12"
- "3.11"
MINIMAL: [""]
include:
- CONDA_PY: "3.11"
MINIMAL: "minimal"
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
- uses: actions/setup-python@v2
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.CONDA_PY }}
miniforge-version: latest
- name: "Install requirements"
env:
MINIMAL: ${{ matrix.MINIMAL }}
CONDA_PY: ${{ matrix.CONDA_PY }}
run: |
if [ -z "$MINIMAL" ] ; then
source devtools/conda_install_reqs.sh
else
# In this case we're actually double-installing (not just
# installing requirements here). We prefer this to using the
# conda_install_reqs script so we can test deps coming from PyPI
python -m pip install -e .[test]
fi
python -m pip install autorelease
- name: "Install"
run: |
python -m pip install --no-deps -e .
- name: "Working directory"
run: |
pwd
ls -l
- name: "Check installation"
run: |
python -c "import openpathsampling; print(openpathsampling.version.full_version)"
- name: "Versions"
run: conda list
- name: "Autorelease check"
run: autorelease check --conf ./.autorelease/autorelease.yaml
#- name: "DEBUG: enable SSH login"
#uses: mxschmitt/action-tmate@v3
- name: "Unit Tests"
env:
PY_COLORS: "1"
run: py.test -vv -s --cov --cov-report xml
- name: "Tests: Experimental"
if: matrix.MINIMAL == '' && matrix.CONDA_PY != '2.7'
run: py.test openpathsampling/experimental/ -vv -s
- uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: "Notebook tests"
if: matrix.MINIMAL == ''
run: |
pushd examples/ && ./ipynbtests.sh || exit 1 && popd