Skip to content

[pre-commit.ci] pre-commit autoupdate #650

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #650

Workflow file for this run

name: workflows-ci
on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
- "pydantic_2"
- "add-split-model"
schedule:
# Nightly tests run on main by default:
# Scheduled workflows run on the latest commit on the default or base branch.
# (from https://help.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule)
- cron: "0 0 * * *"
workflow_dispatch:
merge_group:
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
defaults:
run:
shell: bash -l {0}
jobs:
test:
name: Test on ${{ matrix.os }}, Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.11"]
env:
OE_LICENSE: ${{ github.workspace }}/oe_license.txt
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Get Info About Runner
run: |
uname -a
df -h
ulimit -a
- name: Get current date
id: date
run: echo "date=$(date +%Y-%m-%d)" >> "${GITHUB_OUTPUT}"
# More info on options: https://github.com/mamba-org/provision-with-micromamba
- name: Setup Conda Environment
uses: mamba-org/setup-micromamba@v1
with:
micromamba-version: latest
environment-file: devtools/conda-envs/${{ matrix.os }}/workflows.yaml
environment-name: workflows
cache-environment: true
cache-downloads: true
cache-environment-key: environment-${{ steps.date.outputs.date }}
cache-downloads-key: downloads-${{ steps.date.outputs.date }}
create-args: >-
python==${{ matrix.python-version }}
- name: Install packages
run: |
micromamba install -n workflows --file devtools/conda-envs/${{ matrix.os }}/data.yaml
micromamba install -n workflows --file devtools/conda-envs/${{ matrix.os }}/simulation.yaml
micromamba install -n workflows --file devtools/conda-envs/${{ matrix.os }}/spectrum.yaml
micromamba install -n workflows --file devtools/conda-envs/${{ matrix.os }}/cli.yaml
micromamba install -n workflows --file devtools/conda-envs/${{ matrix.os }}/docking.yaml
micromamba install -n workflows --file devtools/conda-envs/${{ matrix.os }}/dataviz.yaml
python -m pip install -e ./drugforge-data --no-deps
python -m pip install -e ./drugforge-modeling --no-deps
python -m pip install -e ./drugforge-cli --no-deps
python -m pip install -e ./drugforge-dataviz --no-deps
python -m pip install -e ./drugforge-docking --no-deps
python -m pip install -e ./drugforge-ml --no-deps
python -m pip install -e ./drugforge-simulation --no-deps
python -m pip install -e ./drugforge-spectrum --no-deps
python -m pip install -e ./drugforge-workflows --no-deps
micromamba list
- name: Test OE License & Write License to File
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:
CDDTOKEN: ${{ secrets.ASAP_CDD_VAULT_TOKEN_READ_ONLY }}
MOONSHOT_CDD_VAULT_NUMBER: ${{ secrets.MOONSHOT_CDD_VAULT_NUMBER }}
run: |
# run each package test suite; append to coverage file
# Exit immediately if a command exits with a non-zero status.
set -e
pytest -n auto --durations=10 -v --cov-report=xml --cov-report=term --color=yes \
--cov=drugforge-workflows \
drugforge-workflows/drugforge/workflows/tests
- name: Upload Code Coverage to Codecov
uses: codecov/codecov-action@v3
# Don't upload coverage scheduled or on fork
if: ${{ github.repository == 'choderalab/drugforge'
&& github.event != 'schedule' }}
with:
file: ./coverage.xml
flags: unittests
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}
fail_ci_if_error: false