Skip to content

CI with gufe/openfe RC #42

CI with gufe/openfe RC

CI with gufe/openfe RC #42

Workflow file for this run

name: "CI with gufe/openfe RC"
on:
pull_request:
branches:
push:
branches:
- main
schedule:
# Daily at 07:00 UTC
- cron: "0 7 * * *"
release:
types:
- published
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
defaults:
run:
shell: bash -l {0}
jobs:
tests:
runs-on: ${{ matrix.os }}-latest
name: "💻-${{matrix.os }} 🐍-${{ matrix.python-version }}"
strategy:
fail-fast: false
matrix:
os: ["ubuntu"]
python-version:
- "3.11"
env:
OE_LICENSE: ${{ github.workspace }}/oe_license.txt
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "Setup Micromamba"
uses: mamba-org/setup-micromamba@v1
with:
environment-file: devtools/conda-envs/test_env.yaml
environment-name: feflow-env
cache-environment: true
cache-downloads: true
create-args: >-
python=${{ matrix.python-version }}
init-shell: bash
- name: "Install RC versions of Openfe and Gufe"
run: |
echo "Installing Gufe and OpenFe RC versions"
micromamba install -y -c conda-forge/label/gufe_rc -c conda-forge/label/openfe_rc "gufe=*rc*" "openfe=*rc*"
- name: "Install"
run: python -m pip install --no-deps -e .
- name: "Test imports"
run: |
# if we add more to this, consider changing to for + env vars
python -Ic "import feflow; print(feflow.__version__)"
- name: "Environment Information"
run: |
micromamba info
micromamba list
- name: Decrypt OpenEye license
shell: bash -l {0}
env:
OE_LICENSE_TEXT: ${{ secrets.OE_LICENSE }}
run: |
echo "${OE_LICENSE_TEXT}" > ${OE_LICENSE}
python -c "import openeye; assert openeye.oechem.OEChemIsLicensed(), 'OpenEye license checks failed!'"
- name: "Run tests"
env:
# Set the OFE_SLOW_TESTS to True if running a Cron job
OFE_SLOW_TESTS: ${{ fromJSON('{"false":"false","true":"true"}')[github.event_name != 'pull_request'] }}
run: |
pytest -n auto -v --cov=feflow --cov-report=xml --durations=10