-
Notifications
You must be signed in to change notification settings - Fork 209
146 lines (128 loc) · 3.73 KB
/
ci.yml
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
name: CI
on:
push:
branches:
- "master"
- "maintenance/.+"
pull_request:
branches:
- "master"
- "maintenance/.+"
schedule:
# Run a cron job once daily, weekdays only
- cron: "0 3 * * 1-5"
jobs:
test:
name: Pytest
runs-on: ${{ matrix.cfg.os }}
strategy:
fail-fast: false
matrix:
cfg:
- os: ubuntu-latest
python-version: "3.6"
- os: ubuntu-latest
python-version: "3.9"
- os: macos-latest
python-version: "3.6"
- os: windows-latest
python-version: "3.6"
env:
PYVER: ${{ matrix.cfg.python-version }}
PACKAGE: teachopencadd
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.cfg.python-version }}
activate-environment: teachopencadd
channel-priority: true
environment-file: devtools/test_env.yml
auto-activate-base: false
- name: Additional info about the build
shell: bash
run: |
uname -a
df -h
ulimit -a
- name: Install package
shell: bash -l {0}
run: |
pip install . --no-deps -vv
- name: Environment Information
shell: bash -l {0}
run: |
conda info --all
conda list
- name: Test CLI
shell: bash -l {0}
run: |
teachopencadd
- name: Run tests
shell: bash -l {0}
run: |
PYTEST_ARGS="--nbval-lax --current-env --dist loadscope --numprocesses 2"
if [ "$RUNNER_OS" != "Windows" ]; then
pytest $PYTEST_ARGS teachopencadd/talktorials/T*/talktorial.ipynb
else
pytest $PYTEST_ARGS teachopencadd/talktorials/ --ignore-glob=teachopencadd/talktorials/T019* --ignore=teachopencadd/talktorials/T001_query_chembl/data/all_chembl_activities.ipynb
fi
format:
name: Black
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Install format dependencies
run: python -m pip install black-nb shyaml
- name: Run black-nb
run: |
black-nb -l 99 --check teachopencadd/talktorials/T*/talktorial.ipynb
readmes:
name: READMEs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Install nbformat
run: python -m pip install nbformat shyaml
- name: Check READMEs are up-to-date
run: |
for path in teachopencadd/talktorials/T*/talktorial.ipynb; do
python devtools/regenerate_readmes.py --output README.md $path
done
# If the script above introduced changes (it shouldn't!), git diff will have output and an error code
git diff --exit-code
condabuild:
name: Conda package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Fetch all tags
shell: bash
run: |
git fetch --tags --force
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: 3.6
channel-priority: true
auto-activate-base: true
channels: conda-forge,defaults
- name: Additional info about the build
shell: bash
run: |
uname -a
df -h
ulimit -a
- name: Environment Information
shell: bash -l {0}
run: |
conda info --all
conda list
- name: Build package
shell: bash -l {0}
run: |
conda install conda-build anaconda
conda build devtools/conda-recipe