Skip to content

Commit

Permalink
Update OE lisence check action (#51)
Browse files Browse the repository at this point in the history
* Update OE license check action

* Fix
  • Loading branch information
mattwthompson authored Jan 2, 2024
1 parent 583bac3 commit 03bea36
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 30 deletions.
40 changes: 10 additions & 30 deletions .github/workflows/oe_license.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,14 @@ name: OE License

on:
push:
branches:
- "master"
pull_request:
branches:
- "master"
workflow_dispatch:
schedule:
# Nightly tests run on master 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 * * *"
- cron: "0 2 * * *"

defaults:
run:
shell: bash -leo pipefail {0} {0}


jobs:
test:
Expand All @@ -23,32 +20,15 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Additional info about the build
shell: bash
run: |
uname -a
df -h
ulimit -a
# More info on options: https://github.com/conda-incubator/setup-miniconda
- uses: conda-incubator/[email protected]
- name: Set up conda environment
uses: mamba-org/setup-micromamba@v1
with:
python-version: "3.7"
channels: conda-forge,defaults,openeye
auto-update-conda: true
auto-activate-base: true
show-channel-urls: true

- name: Install OpenEye tools
shell: bash -l {0}
run: conda install openeye-toolkits
environment-file: devtools/conda-envs/oe_license_check.yaml

- name: Decrypt OpenEye license
shell: bash
env:
ENC_OE_LICENSE: ${{ secrets.OE_LICENSE }}
run: echo "${ENC_OE_LICENSE}" > ${OE_LICENSE}

- name: Check OpenEye license
shell: bash -l {0}
run: python -c "import openeye; assert openeye.OEChemIsLicensed()"
run: python -c "import openeye; assert openeye.OEChemIsLicensed(), 'OpenEye licenses out of date!'"
7 changes: 7 additions & 0 deletions devtools/conda-envs/oe_license_check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: oe-license-check
channels:
- openeye
- conda-forge
dependencies:
- python =3.10
- openeye-toolkits

0 comments on commit 03bea36

Please sign in to comment.