Skip to content

Feature/raw exams search #897

Feature/raw exams search

Feature/raw exams search #897

Workflow file for this run

name: Build
on:
pull_request:
branches: [master, develop, feature/acceptance_tests_lanceiros]
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:11.6
env:
POSTGRES_USER: postgres
POSTGRES_DB: noharm
ports:
- 5432:5432
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Setup Python
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Setup PostgreSQL
run: |
git clone https://github.com/noharm-ai/database
psql -h localhost -U postgres -d noharm -a -f database/noharm-public.sql -v ON_ERROR_STOP=1
psql -h localhost -U postgres -d noharm -a -f database/noharm-create.sql -v ON_ERROR_STOP=1
psql -h localhost -U postgres -d noharm -a -f database/noharm-newuser.sql -v ON_ERROR_STOP=1
psql -h localhost -U postgres -d noharm -a -f database/noharm-triggers.sql -v ON_ERROR_STOP=1
psql -h localhost -U postgres -d noharm -a -f database/noharm-insert.sql -v ON_ERROR_STOP=1
- name: Setup Application
run: |
python mobile.py &
sleep 10
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: sa-east-1
- name: Run Coverage Report
env:
CACHE_BUCKET_NAME: ${{ secrets.CACHE_BUCKET_NAME }}
run: python -m pytest --cov-report xml --cov=.
- name: Submit Coverage Report
if: ${{ env.CC_TEST_REPORTER_ID != '' }}
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
build-prod:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:11.6
env:
POSTGRES_USER: postgres
POSTGRES_DB: noharm
ports:
- 5432:5432
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Setup Python
run: |
python -m pip install --upgrade pip
pip install -r requirements-prod.txt
- name: Setup PostgreSQL
run: |
git clone https://github.com/noharm-ai/database
psql -h localhost -U postgres -d noharm -a -f database/noharm-public.sql -v ON_ERROR_STOP=1
psql -h localhost -U postgres -d noharm -a -f database/noharm-create.sql -v ON_ERROR_STOP=1
psql -h localhost -U postgres -d noharm -a -f database/noharm-newuser.sql -v ON_ERROR_STOP=1
psql -h localhost -U postgres -d noharm -a -f database/noharm-triggers.sql -v ON_ERROR_STOP=1
psql -h localhost -U postgres -d noharm -a -f database/noharm-insert.sql -v ON_ERROR_STOP=1
- name: Setup Application
run: |
python mobile.py &
sleep 10