Pydantic v1/v2 compatibility #1949
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" | |
schedule: | |
- cron: "0 0 * * *" | |
defaults: | |
run: | |
shell: bash -l {0} | |
jobs: | |
test: | |
name: ${{ matrix.cfg.os }}, 🐍=${{ matrix.python-version }}, program=${{ matrix.cfg.conda-env }}, pydantic=${{ matrix.pydantic-version }} | |
runs-on: ${{ matrix.cfg.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: | |
- "3.9" | |
pydantic-version: | |
- "1" | |
- "2" | |
cfg: | |
- os: ubuntu-latest | |
conda-env: basic | |
- os: macOS-latest | |
conda-env: basic | |
- os: ubuntu-latest | |
conda-env: psi4 | |
env: | |
OE_LICENSE: ${{ github.workspace }}/oe_license.txt | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Conda Environment | |
uses: mamba-org/provision-with-micromamba@main | |
with: | |
environment-file: devtools/conda-envs/${{ matrix.cfg.conda-env }}.yaml | |
extra-specs: | | |
python=${{ matrix.python-version }} | |
pydantic=${{ matrix.pydantic-version }} | |
channel-priority: "flexible" | |
- name: License OpenEye | |
run: | | |
echo "${SECRET_OE_LICENSE}" > ${OE_LICENSE} | |
python -c "from openeye import oechem; assert oechem.OEChemIsLicensed()" | |
env: | |
SECRET_OE_LICENSE: ${{ secrets.OE_LICENSE }} | |
- name: Install Package | |
run: | | |
python setup.py develop --no-deps | |
- name: Conda Environment Information | |
run: | | |
conda info | |
conda list | |
- name: Run Tests | |
run: | | |
python -m pytest -v --cov=openff --cov-config=setup.cfg openff/qcsubmit/tests/ --cov-report=xml | |
- name: Codecov | |
uses: codecov/codecov-action@v1 | |
with: | |
file: ./coverage.xml | |
fail_ci_if_error: false |