v2.00-beta #620
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
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.8 | |
- 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: Run Python Tests | |
run: python -m pytest -v | |
- name: Run Coverage Report | |
run: python -m pytest --cov-report xml --cov=. | |
- name: Submit Coverage Report | |
if: ${{ env.CC_TEST_REPORTER_ID != '' }} | |
uses: paambaati/codeclimate-action@v2.7.5 | |
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.8 | |
- 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 |