Advertisement
Guest User

Untitled

a guest
Sep 14th, 2017
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. stages:
  2. - lint
  3. - test
  4.  
  5. flake:
  6. stage: lint
  7. image: python:3.6.1-alpine
  8. script:
  9. - pip install flake8
  10. - flake8 --statistics --show-source api_gasolina
  11. only:
  12. - /^feature.*$/
  13. - /^bugfix.*$/
  14. - /^hotfix.*$/
  15. - develop
  16. - master
  17.  
  18. test:
  19. stage: test
  20. image: python:3.6.1-alpine
  21. services:
  22. - postgres:latest
  23. variables:
  24. POSTGRES_DB: consumo_gasolina
  25. POSTGRES_USER: postgres
  26. POSTGRES_PASSWORD: 123456
  27. artifacts:
  28. paths:
  29. - coverage_html.tar.gz
  30. script:
  31. - set -ex && apk add --no-cache --virtual .fetch-deps build-base python-dev python3-dev postgresql-dev ncurses-dev gettext libpng-dev jpeg-dev
  32. - mkdir html_coverage
  33. - pip install -U pip
  34. - pip install -r requirements.txt
  35. - coverage run ./manage.py test --parallel && coverage report -m && coverage html -d html_coverage
  36. - tar -czvf coverage_html.tar.gz html_coverage/
  37. - mv html_coverage/ public/
  38. only:
  39. - /^feature.*$/
  40. - /^bugfix.*$/
  41. - /^hotfix.*$/
  42. - develop
  43. - master
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement