-
Notifications
You must be signed in to change notification settings - Fork 1
89 lines (74 loc) · 2.17 KB
/
ci.yaml
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
name: ci
on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
workflow_dispatch:
schedule:
- cron: "7 0 * * *"
defaults:
run:
shell: bash -l {0}
jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
python-version:
- "3.10"
- "3.11"
- "3.12"
env:
OE_LICENSE: ${{ github.workspace }}/oe_license.txt
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up conda environment
uses: mamba-org/setup-micromamba@v2
with:
environment-file: devtools/conda-envs/dev.yaml
create-args: >-
python=${{ matrix.python-version }}
- name: Install PASCAL Compiler (MacOS)
if: startsWith(matrix.os, 'mac')
run: brew install fpc
- name: Install PASCAL Compiler (Ubuntu)
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt-get install fp-compiler
- name: Install checkmol
run: |
curl https://homepage.univie.ac.at/norbert.haider/download/chemistry/checkmol/checkmol.pas > checkmol.pas
fpc checkmol.pas -S2
echo $(pwd) >> $GITHUB_PATH
- name: Install package
run: python -m pip install -e .
- name: Install and license OpenEye Toolkits
run: |
echo "${SECRET_OE_LICENSE}" > ${OE_LICENSE}
python -c "from openeye import oechem; assert oechem.OEChemIsLicensed()"
env:
SECRET_OE_LICENSE: ${{ secrets.OE_LICENSE }}
- name: Run tests
run: |
pytest -r fEx -n logical --durations=10 \
--cov=yammbs/ --cov-report=xml --cov-config=setup.cfg \
yammbs/
- name: Run mypy
# RDKit packages have bad stubs on Linux for some reason
if: ${{ matrix.python-version == '3.12' && matrix.os == 'macos-latest' }}
run: pip install -r typing-requirements.txt && python -m mypy -p "yammbs" --exclude "yammbs/_tests"
- name: CodeCov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
flags: unittests