Skip to content

Visitation Flow

Visitation Flow #1250

Workflow file for this run

name: Docker build & run tests
on:
# Triggers the workflow on push or pull request events for the main branch
push:
branches:
- main
pull_request:
branches:
- main
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
ci:
runs-on: ubuntu-latest
env:
POSTGRES_DB_DEV: ${{ secrets.POSTGRES_DB_DEV }}
POSTGRES_DB_TEST: ${{ secrets.POSTGRES_DB_TEST }}
POSTGRES_USER: ${{ secrets.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
DB_HOST: ${{ secrets.DB_HOST }}
# Firebase secrets
FIREBASE_SVC_ACCOUNT_PRIVATE_KEY_ID: ${{ secrets.DEV_FIREBASE_SVC_ACCOUNT_PRIVATE_KEY_ID }}
FIREBASE_SVC_ACCOUNT_PRIVATE_KEY: ${{ secrets.DEV_FIREBASE_SVC_ACCOUNT_PRIVATE_KEY }}
FIREBASE_SVC_ACCOUNT_CLIENT_EMAIL: ${{ secrets.DEV_FIREBASE_SVC_ACCOUNT_CLIENT_EMAIL }}
FIREBASE_SVC_ACCOUNT_CLIENT_ID: ${{ secrets.DEV_FIREBASE_SVC_ACCOUNT_CLIENT_ID }}
FIREBASE_SVC_ACCOUNT_AUTH_URI: ${{ secrets.DEV_FIREBASE_SVC_ACCOUNT_AUTH_URI }}
FIREBASE_SVC_ACCOUNT_TOKEN_URI: ${{ secrets.DEV_FIREBASE_SVC_ACCOUNT_TOKEN_URI }}
FIREBASE_SVC_ACCOUNT_AUTH_PROVIDER_X509_CERT_URL: ${{ secrets.DEV_FIREBASE_SVC_ACCOUNT_AUTH_PROVIDER_X509_CERT_URL }}
FIREBASE_SVC_ACCOUNT_CLIENT_X509_CERT_URL: ${{ secrets.DEV_FIREBASE_SVC_ACCOUNT_CLIENT_X509_CERT_URL }}
FIREBASE_STORAGE_DEFAULT_BUCKET: ${{ secrets.DEV_FIREBASE_STORAGE_DEFAULT_BUCKET }}
steps:
- uses: actions/checkout@v2
# installing dependencies
- name: Install dependencies
run: yarn --cwd ./frontend/ && yarn --cwd ./backend/python/
# building the docker containers
- name: Build the docker-compose stack
run: docker-compose -f docker-compose.ci.yml up -d
# check running containers
- name: Check running containers
run: docker ps -a
# running frontend tests
- name: Run tests for frontend
working-directory: ./frontend
run: yarn test
# running backend tests
- name: Run tests for backend
run: docker exec cas_py_backend ./run-test.sh