tests #1403
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: tests | |
on: | |
push: | |
branches: | |
- "main" | |
pull_request: | |
branches: | |
- "main" | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
test: | |
name: Test on ${{ matrix.os }}, Python ${{ matrix.python-version }}, ${{ matrix.toolkits }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-latest"] | |
python-version: ["3.9", "3.10"] | |
toolkits: ["rdkit_and_openeye", "rdkit"] | |
env: | |
OE_LICENSE: ${{ github.workspace }}/oe_license.txt | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Conda Environment | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: devtools/conda-envs/test_env_${{ matrix.toolkits }}.yaml | |
channel-priority: "flexible" | |
extra-specs: | | |
python=${{ matrix.python-version }} | |
- name: License OpenEye | |
if: ${{ matrix.toolkits != 'rdkit' }} | |
shell: bash -l {0} | |
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 | |
shell: bash -l {0} | |
run: | | |
python -m pip install -e . | |
- name: Conda Environment Information | |
shell: bash -l {0} | |
run: | | |
conda info | |
conda list | |
- name: Run Tests | |
shell: bash -l {0} | |
run: | | |
pytest -v --cov=openff openff/recharge/tests/ --cov-report=xml | |
- name: CodeCov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage.xml | |
fail_ci_if_error: true |