Skip to content

ci

ci #67

Workflow file for this run

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 */5 * *' # Run every 5 days
workflow_dispatch:
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
defaults:
run:
shell: bash -l {0}
jobs:
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 ~/.OpenEye
- name: Copy OpenEye license file
env:
OE_LICENSE: ${{ secrets.OE_LICENSE }}
run: |
echo "$OE_LICENSE" > ~/.OpenEye/oe_license.txt
- name: Build containers
run: |
docker-compose -f docker-compose-dev.yml build --build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g)
docker container ls
docker-compose -f docker-compose-dev.yml up -d
- name: Chown volume
run: |
ls -alsh
ls -alsh argos
sudo chown -R $(id -u):$(id -g) argos/pdb_data
- name: Run tests
run: |
docker-compose -f docker-compose-dev.yml exec -T web bash -c "cd argos && /opt/conda/bin/python manage.py test --no-input"