-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c0f1bad
commit 0cd73f0
Showing
3 changed files
with
122 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
name: Deployment tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
pull_request: | ||
branches: | ||
- "main" | ||
release: | ||
types: | ||
- released | ||
- prereleased | ||
schedule: | ||
- cron: "0 0 * * *" | ||
workflow_dispatch: | ||
|
||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
jobs: | ||
test: | ||
|
||
name: ${{ matrix.os }}, 🐍=${{ matrix.python-version }}, 👁️=${{ matrix.openeye }} | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
python-version: ["3.8"] | ||
openeye: ["true", "false"] | ||
|
||
env: | ||
OE_LICENSE: ${{ github.workspace }}/oe_license.txt | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install latest release from conda with OpenEye Toolkits | ||
if: ${{ matrix.openeye == 'false' }} | ||
uses: mamba-org/provision-with-micromamba@main | ||
with: | ||
environment-file: devtools/conda-envs/test-env.yaml | ||
extra-specs: | | ||
python=${{ matrix.python-version }} | ||
openff-bespokefit | ||
- name: Install latest release from conda without OpenEye Toolkits | ||
if: ${{ matrix.openeye == 'true' }} | ||
uses: mamba-org/provision-with-micromamba@main | ||
with: | ||
environment-file: devtools/conda-envs/no_openeye.yaml | ||
extra-specs: | | ||
python=${{ matrix.python-version }} | ||
openff-bespokefit | ||
- name: Test not pinning to old h5py | ||
run: | | ||
micromamba install "h5py >3.2" -c conda-forge -yq | ||
- name: License OpenEye Toolkits | ||
if: ${{ matrix.openeye == true }} | ||
env: | ||
OE_LICENSE_TEXT: ${{ secrets.OE_LICENSE }} | ||
run: | | ||
echo "${OE_LICENSE_TEXT}" > ${OE_LICENSE} | ||
python -c "from openeye import oechem; assert oechem.OEChemIsLicensed()" | ||
- name: Conda environment Information | ||
run: | | ||
conda info | ||
conda list | ||
- name: Verify that the latest version was installed | ||
run: | | ||
# Move so that we don't just look at tags in the checked-out repo | ||
cd /tmp/ | ||
export LATEST_TAG=$(git ls-remote --tags https://github.com/openforcefield/openff-bespokefit.git | cut -f2 | grep -E "([0-9]+)\.([0-9]+)\.([0-9]+)$" | sort --version-sort | tail -1 | sed 's/refs\/tags\///') | ||
export FOUND_VER=$(python -c "import openff.bespokefit; print(openff.bespokefit.__version__)") | ||
echo "Latest tag is" | ||
echo $LATEST_TAG | ||
echo "Found version is" | ||
echo $FOUND_VER | ||
if [[ $LATEST_TAG != $FOUND_VER ]]; | ||
then echo "Version mismatch" | ||
exit 1 | ||
fi | ||
cd - | ||
- name: Run tests | ||
run: | | ||
pytest -v openff/bespokefit/tests | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: latest-deployment | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- openff-bespokefit =0.2 | ||
- ambertools | ||
- pytest | ||
- pytest-cov | ||
- pytest-asyncio | ||
- pytest-celery | ||
- requests-mock |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: latest-deployment | ||
channels: | ||
- conda-forge | ||
- openeye | ||
dependencies: | ||
- openff-bespokefit =0.2 | ||
- openeye-toolkits | ||
- pytest | ||
- pytest-cov | ||
- pytest-asyncio | ||
- pytest-celery | ||
- requests-mock |