Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add deployment tests workflow #207

Merged
merged 32 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
1c81fa7
# This is a combination of 10 commits.
mattwthompson Dec 15, 2022
a9690ef
Add deployment tests
mattwthompson Jan 17, 2023
96e6d0e
parent a9690efbe251710bbe3b7b9400d2ed091a7ebd51
mattwthompson Jan 17, 2023
27b6261
Checkout 0.1.3
mattwthompson Jan 18, 2023
3d193ff
Fetch
mattwthompson Jan 18, 2023
3f3eec3
Tweak
mattwthompson Jan 18, 2023
ee5d5f9
Update deployment tests for 0.2.1
Yoshanuikabundi Apr 5, 2023
06a8523
Add integration test to deployment CI
Yoshanuikabundi Apr 5, 2023
409a8e3
Save file, then commit
Yoshanuikabundi Apr 5, 2023
c67c8b2
Merge branch 'main' into add-deployment-action
j-wags Jul 24, 2023
22a3d9b
Merge remote-tracking branch 'upstream/main' into add-deployment-action
mattwthompson Nov 14, 2024
05bff50
Update action
mattwthompson Nov 14, 2024
909f6f7
Fix path
mattwthompson Nov 14, 2024
4d3a821
Shim
mattwthompson Nov 14, 2024
c7f19fe
Debug
mattwthompson Nov 14, 2024
c5b16fc
Fix
mattwthompson Nov 14, 2024
c246bfe
Fix
mattwthompson Nov 14, 2024
39b0d2b
Update test environments
mattwthompson Nov 14, 2024
69c25cd
Debug
mattwthompson Nov 14, 2024
d30177f
Debug
mattwthompson Nov 14, 2024
5fe9f57
Debug
mattwthompson Nov 14, 2024
7fda118
Debug
mattwthompson Nov 14, 2024
8acb767
Debug
mattwthompson Nov 14, 2024
eef3c63
Debug
mattwthompson Nov 14, 2024
63e96bb
Debug
mattwthompson Nov 14, 2024
e175887
Debug
mattwthompson Nov 14, 2024
cca6a1a
Debug
mattwthompson Nov 14, 2024
0cddc8d
Cleanup
mattwthompson Nov 14, 2024
17c2b00
Apply suggestions from code review
j-wags Nov 25, 2024
ec898c8
Merge branch 'main' into add-deployment-action
j-wags Nov 25, 2024
1c4c69a
temporarily re-add run on push
j-wags Nov 25, 2024
ae78156
get actions yamls to final form and update release histroy
j-wags Nov 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions .github/workflows/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Deployment tests

on:
release:
types:
- released
- prereleased
j-wags marked this conversation as resolved.
Show resolved Hide resolved
schedule:
- cron: "10 */12 * * *"
workflow_dispatch:

defaults:
run:
shell: bash -l {0}

jobs:
test:

name: ${{ matrix.os }}, 🐍=${{ matrix.python-version }}, 👁️=${{ matrix.openeye }}, ∫=${{ matrix.integration }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.11"]
openeye: [true, false]
integration: [true]

env:
OE_LICENSE: ${{ github.workspace }}/oe_license.txt

steps:
- uses: actions/checkout@v4

- name: Install latest release from conda with OpenEye Toolkits
if: ${{ matrix.openeye == true }}
uses: mamba-org/setup-micromamba@v2
with:
environment-file: devtools/conda-envs/deployment_openeye.yaml
create-args: >-
python=${{ matrix.python-version }}

- name: Install latest release from conda without OpenEye Toolkits
if: ${{ matrix.openeye == false }}
uses: mamba-org/setup-micromamba@v2
with:
environment-file: devtools/conda-envs/deployment.yaml
create-args: >-
python=${{ matrix.python-version }}

- name: License OpenEye
if: ${{ matrix.openeye == true }}
run: |
echo "${SECRET_OE_LICENSE}" > ${OE_LICENSE}
python -c "from openeye import oechem; assert oechem.OEChemIsLicensed()"
env:
SECRET_OE_LICENSE: ${{ secrets.OE_LICENSE }}

- name: Checkout most recent tag
id: vars
run: |
echo "PULL_REQUEST_HEAD=$(git log -1 --format=%H)" >> $GITHUB_OUTPUT

git fetch --all
git checkout $(git describe --tags $(git rev-list --tags --max-count=1))

- name: Run tests
run: |
python -m pytest --durations=0 openff/bespokefit/_tests

- name: Run Integration Tests
if: ${{ matrix.integration == true }}
run: |
openff-bespoke executor run --smiles 'CC' \
--workflow 'default' \
--default-qc-spec xtb gfn2xtb none \
--target-torsion '[C:1]-[C:2]'

- name: Go back to pull request HEAD
# setup-micromamba needs the environment file to exist, which it might not on the most recent tag
run: git checkout ${{ steps.vars.outputs.PULL_REQUEST_HEAD }}
13 changes: 13 additions & 0 deletions devtools/conda-envs/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: latest-deployment
channels:
- conda-forge
dependencies:
- openff-bespokefit
- openff-toolkit =0.16
j-wags marked this conversation as resolved.
Show resolved Hide resolved
- ambertools
- xtb-python
- pytest
- pytest-cov
- pytest-asyncio
- pytest-celery
- requests-mock
14 changes: 14 additions & 0 deletions devtools/conda-envs/deployment_openeye.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: latest-deployment-openeye
channels:
- conda-forge
- openeye
dependencies:
- openff-bespokefit
- openff-toolkit =0.16
j-wags marked this conversation as resolved.
Show resolved Hide resolved
- openeye-toolkits
- xtb-python
- pytest
- pytest-cov
- pytest-asyncio
- pytest-celery
- requests-mock
3 changes: 1 addition & 2 deletions devtools/conda-envs/docs-env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ dependencies:
- click-option-group
- rdkit =2024.03.5
- openff-utilities
- openff-toolkit-base =0.15
- openff-interchange # only needed because openff-toolkit-base
- openff-toolkit =0.15
j-wags marked this conversation as resolved.
Show resolved Hide resolved
- openff-forcefields >=2024.04.0
- openff-qcsubmit >=0.50
- openmm >=7.6.0
Expand Down
3 changes: 1 addition & 2 deletions devtools/conda-envs/no_openeye.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ dependencies:
- rdkit =2024.03.5
- ambertools >=22
- openff-utilities
- openff-toolkit-base >=0.15
- openff-interchange # only needed because openff-toolkit-base
- openff-toolkit >=0.15
- openff-forcefields >=2024.04.0
- openff-qcsubmit >=0.50
- openmm >=7.6.0
Expand Down
3 changes: 1 addition & 2 deletions devtools/conda-envs/test-env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ dependencies:
- click-option-group
- rdkit =2024.03.5
- openff-utilities
- openff-toolkit-base >=0.15
- openff-interchange # only needed because openff-toolkit-base
- openff-toolkit >=0.15
- openff-forcefields >=2024.04.0
- openff-units
- openff-qcsubmit >=0.50
Expand Down