Test on MacOS and remove progress bar from example #27
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: Base tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
schedule: | |
# weekly tests, Sundays at midnight | |
- cron: "0 0 * * 0" | |
concurrency: | |
# Specific group naming so CI is only cancelled | |
# within same PR or on merge to main | |
group: ${{ github.ref }}-${{ github.head_ref }}-${{ github.workflow }} | |
cancel-in-progress: true | |
defaults: | |
run: | |
shell: bash -l {0} | |
env: | |
OE_LICENSE: ${{ github.workspace }}/oe_license.txt | |
jobs: | |
main_tests: | |
name: CI (${{ matrix.os }}, py-${{ matrix.python-version }}, openeye=${{ matrix.include-openeye }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macOS-13, macOS-latest, ubuntu-latest] | |
python-version: ["3.10", "3.11", "3.12"] | |
include-openeye: [false, true] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build information | |
run: | | |
uname -a | |
df -h | |
ulimit -a | |
- name: Install environment | |
uses: mamba-org/setup-micromamba@v2 | |
with: | |
environment-file: devtools/conda-envs/base.yaml | |
create-args: >- | |
python=${{ matrix.python-version }} | |
- name: Install package | |
run: | | |
python -m pip install . --no-deps | |
- uses: ./.github/actions/include-openeye | |
if: matrix.include-openeye == true | |
with: | |
openeye-license-text: ${{ secrets.OE_LICENSE }} | |
openeye-license-file: ${{ env.OE_LICENSE }} | |
- name: Uninstall OpenEye | |
if: matrix.include-openeye == false | |
run: conda remove --force openeye-toolkits --yes || echo "openeye not installed" | |
- name: Check toolkit installations | |
shell: bash -l -c "python -u {0}" | |
run: | | |
from openff.toolkit.utils.toolkits import OPENEYE_AVAILABLE, RDKIT_AVAILABLE | |
assert str(OPENEYE_AVAILABLE).lower() == '${{ matrix.include-openeye }}' | |
assert str(RDKIT_AVAILABLE).lower() == 'true' | |
- name: Run tests | |
run: | | |
python -m pytest -n 4 -v --cov=openff/nagl --cov-config=setup.cfg --cov-append --cov-report=xml --color=yes openff/nagl/ |