Skip to content

Commit

Permalink
Merge pull request #2 from MRB-Computer-Vision/feature/first-setup-do…
Browse files Browse the repository at this point in the history
…cker-and-first-impressions

[FEATURE] First setup docker and first impressions
  • Loading branch information
bragadennis committed May 21, 2020
2 parents 121af38 + ea94d54 commit c311fd4
Show file tree
Hide file tree
Showing 47 changed files with 2,115 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .ebextensions/01_packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
packages:
yum:
postgresql95-devel: []
3 changes: 3 additions & 0 deletions .ebextensions/02_starter.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
container_commands:
01_migrate:
command: "python manage.py db upgrade"
20 changes: 20 additions & 0 deletions .elasticbeanstalk/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
branch-defaults:
default:
environment: mrb-env
group_suffix: null
feature/first-setup-docker-and-first-impressions:
environment: mrb-env
global:
application_name: mrb-backend
branch: null
default_ec2_keyname: null
default_platform: Python 3.6
default_region: sa-east-1
include_git_submodules: true
instance_profile: null
platform_name: null
platform_version: null
profile: eb-cli
repository: null
sc: null
workspace_type: Application
51 changes: 51 additions & 0 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:

test:
runs-on: ubuntu-latest

services:
postgres:
image: postgres:11
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: respirabrasil_test
ports: ['5432:5432']
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1

- name: Set up Python 3.6
uses: actions/setup-python@v1
with:
python-version: 3.6

- uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
if: steps.cache.outputs.cache-hit != 'true'
- name: Test with pytest
env:
DB_DATABASE_TEST: respirabrasil_test
DB_HOST=localhost
DB_PORT=${{ job.services.postgres.ports[5432] }}
DB_USERNAME=postgres
DB_PASSWORD=postgres
run: |
python -m pytest
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
.vscode
.idea
.history
docker/postgres/db
docker/redis/data

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
Loading

0 comments on commit c311fd4

Please sign in to comment.