Use Pydantic v1 API from v2 #44
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.8", "3.9", "3.10"] | |
pydantic-version: ["1", "2"] | |
openmm: [true, false] | |
run-mypy: [false] | |
exclude: | |
- python-version: "3.10" | |
os: macOS-latest | |
openmm: true | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Additional info about the build | |
shell: bash | |
run: | | |
uname -a | |
df -h | |
ulimit -a | |
- 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 setup.py develop --no-deps | |
- name: Environment Information | |
run: | | |
conda info | |
conda list | |
- name: Run mypy | |
run: | | |
if: ${{ matrix.run-mypy == true }} | |
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 }} |