-
Notifications
You must be signed in to change notification settings - Fork 3
122 lines (104 loc) · 3.86 KB
/
Copy pathci.yaml
File metadata and controls
122 lines (104 loc) · 3.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
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
name: CI
on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
schedule:
# At 07:00 UTC on Monday and Thursday.
- cron: "0 7 * * *"
workflow_dispatch:
defaults:
run:
shell: bash -leo pipefail {0} {0}
jobs:
test:
name: ${{ matrix.os }}, 🐍=${{ matrix.python-version }}, 🟠=${{ matrix.ambertools }}, 👁️=${{ matrix.openeye }}, 🐉=${{ matrix.mamba-executable }}@${{ matrix.micromamba-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.12", "3.13", "3.14"]
ambertools: [false, true]
openeye: [false, true]
mamba-executable: ["micromamba"] # TODO: Add "mamba" back
# TEMPORARY, for #156: pin both the pre- and post-4202 micromamba
# releases to confirm the packages-key fix covers both `list --json`
# formats. Revert this axis (and the micromamba-version input below)
# before merging.
micromamba-version: ["2.8.1-0", "2.9.0-0"]
exclude:
- python-version: "3.14"
ambertools: true
- python-version: "3.13"
openeye: true
- python-version: "3.14"
openeye: true
env:
OE_LICENSE: ${{ github.workspace }}/oe_license.txt
COV: --cov=openff/utilities --cov-report=xml --cov-append
steps:
- uses: actions/checkout@v7
- name: Set up conda environment with micromamba
if: matrix.mamba-executable == 'micromamba'
uses: mamba-org/setup-micromamba@v3
with:
environment-file: devtools/conda-envs/test_env.yaml
micromamba-version: ${{ matrix.micromamba-version }}
create-args: >-
python=${{ matrix.python-version }}
- name: Set up conda environment with Mamba
if: matrix.mamba-executable == 'mamba'
uses: conda-incubator/setup-miniconda@v4
with:
environment-file: devtools/conda-envs/test_env.yaml
python-version: ${{ matrix.python-version }}
mamba-version: "*"
- name: Install AmberTools
if: matrix.ambertools == true
run: |
${{ matrix.mamba-executable}} install --yes -c conda-forge ambertools "numpy <2.3"
python -c "from shutil import which; assert which('sqm') is not None"
- name: Check AmberTools Missing
if: matrix.ambertools == false
run: |
python -c "from shutil import which; assert which('sqm') is None"
- name: Install OpenEye Toolkits
if: matrix.openeye == true
run: |
${{ matrix.mamba-executable}} install --yes -c openeye openeye-toolkits
python -c "from openeye import oechem"
- name: Check OpenEye Toolkits missing
if: matrix.openeye == false
run: python devtools/scripts/assert_openeye_not_found.py
- name: Install package
run: python -m pip install -e .
- name: Environment Information
run: ${{ matrix.mamba-executable}} list
- name: Run mypy
if: ${{ matrix.python-version == 3.12 }}
run: mypy -p "openff.utilities"
- name: Run a test with OpenEye toolkits installed but NOT licensed
if: matrix.openeye == true
run:
pytest $COV openff/utilities/_tests/test_utilities.py::test_requires_oe_module_installed_missing_license
- name: License OpenEye
if: matrix.openeye == true
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 unit tests
run: |
pytest $COV openff/utilities/_tests/ -m leaky
pytest $COV openff/utilities/_tests/ -m "not leaky"
- name: Codecov
uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
fail_ci_if_error: true
disable_search: true