Skip to content
Snippets Groups Projects
Commit b1922e28 authored by Eduardo Klosowski's avatar Eduardo Klosowski
Browse files

Unificado testes

parent 8ed604a5
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -10,20 +10,25 @@ variables:
 
lint:
stage: style
script:
before_script:
- pip install -r requirements.txt -r requirements-dev.txt
script:
- flake8
 
test-sqlite:
.test: &test
stage: test
script:
before_script:
- pip install -r requirements.txt -r requirements-dev.txt
- python manage.py collectstatic --noinput
script:
- coverage run manage.py test
- coverage report -m --skip-covered --fail-under=100
 
test-postgres:
stage: test
test_sqlite:
<<: *test
test_postgres:
<<: *test
services:
- postgres:latest
variables:
Loading
Loading
@@ -31,19 +36,15 @@ test-postgres:
POSTGRES_USER: "test"
POSTGRES_PASSWORD: ""
DATABASE_URL: "postgres://test@postgres/test"
script:
- pip install -r requirements.txt -r requirements-dev.txt
- python manage.py collectstatic --noinput
- coverage run manage.py test
- coverage report -m --skip-covered --fail-under=100
 
#heroku:
# stage: deploy
# script:
# before_script:
# - apt-get update -qq && apt-get install -y -qq ruby ruby-dev
# - gem install dpl heroku
# - dpl --provider=heroku --app="$HEROKU_APP" --api-key="$HEROKU_API_KEY"
# - echo -e "machine api.heroku.com\n login user\n password ${HEROKU_API_KEY}" > ~/.netrc && chmod 0600 ~/.netrc
# script:
# - dpl --provider=heroku --app="$HEROKU_APP" --api-key="$HEROKU_API_KEY"
# - heroku run --app "$HEROKU_APP" python manage.py migrate
# only:
# - master
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment