-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
1 changed file
with
67 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,67 @@ | ||
name: ci | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
pull_request: | ||
branches: | ||
- "main" | ||
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: | ||
|
||
env: | ||
OE_LICENSE: ${{ github.workspace }}/.OpenEye/oe_license.txt | ||
|
||
|
||
|
||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install docker-compose | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y docker-compose | ||
- name: Copy example env file | ||
run: | | ||
cp devtools/deployment/.env.example .env | ||
- name: Make .OpenEye directory | ||
run: | | ||
mkdir -p ${{ github.workspace }}/.OpenEye | ||
- 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: Build and run containers | ||
run: | | ||
docker-compose -f docker-compose-dev.yml up -d | ||
- name: Run tests | ||
run: | | ||
docker-compose -f docker-compose-dev.yml exec web bash -c " cd argos && /opt/conda/bin/python manage.py test" |