Consolidate Python config files #2870
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: examples | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
schedule: | |
- cron: "0 7 * * *" | |
workflow_dispatch: | |
defaults: | |
run: | |
shell: bash -l {0} | |
jobs: | |
test: | |
name: Examples on ${{ matrix.os }}, Python ${{ matrix.python-version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-latest | |
python-version: | |
- "3.10" | |
- "3.11" | |
env: | |
OE_LICENSE: ${{ github.workspace }}/oe_license.txt | |
INTERCHANGE_EXPERIMENTAL: "1" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install conda environment | |
uses: mamba-org/setup-micromamba@v2 | |
with: | |
environment-file: devtools/conda-envs/examples_env.yaml | |
create-args: >- | |
python=${{ matrix.python-version }} | |
- name: Install package | |
run: | | |
python -m pip install . | |
- 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: Run docexamples | |
run: | | |
python -m pytest -c /dev/null/ --doctest-modules openff/interchange/ --ignore=openff/interchange/_tests | |
- name: Run example notebooks | |
run: | | |
python -c "from openff.interchange import __file__, __version__; print(f'{__version__=} and {__file__=}')" | |
python -m pytest -c /dev/null/ --nbval-lax --dist loadscope -n logical --durations=20 examples/ \ | |
--ignore=examples/deprecated/ \ | |
--ignore=examples/experimental |