-
Notifications
You must be signed in to change notification settings - Fork 2
67 lines (57 loc) · 1.76 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
name: ci
on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
defaults:
run:
shell: bash -l {0}
jobs:
test:
name: Test on ${{ matrix.os }}, Python ${{ matrix.python-version }}, OpenMM ${{ matrix.openmm }}, Pydantic ${{ matrix.pydantic-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macOS-latest, ubuntu-latest]
python-version: ["3.9", "3.9", "3.11", "3.12"]
pydantic-version: ["1", "2"]
openmm: [true, false]
run-mypy: [false]
exclude:
- python-version: "3.12"
openmm: true
steps:
- uses: actions/checkout@v4
- name: Install conda environment with OpenMM
if: ${{ matrix.openmm == true }}
uses: mamba-org/setup-micromamba@v1
with:
environment-file: devtools/conda-envs/test_env.yaml
create-args: >-
python=${{ matrix.python-version }}
pydantic=${{ matrix.pydantic-version }}
- name: Install conda environment without OpenMM
if: ${{ matrix.openmm == false }}
uses: mamba-org/setup-micromamba@v1
with:
environment-file: devtools/conda-envs/no_openmm.yaml
create-args: >-
python=${{ matrix.python-version }}
- name: Install package
run: python -m pip install -e .
- name: Run mypy
if: ${{ matrix.run-mypy == true }}
run: mypy -p "openff.models"
- name: Run tests
run: pytest -v --cov=openff/models --cov-report=xml --color=yes openff/models/tests/
- name: CodeCov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}