Guest User

Untitled

a guest
Oct 18th, 2017
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.85 KB | None | 0 0
  1. # .circleci/config.yml
  2. version: 2
  3. jobs:
  4. test:
  5. docker:
  6. - image: circleci/python:3.6.2
  7. environment:
  8. PGUSER: root
  9. PGHOST: 127.0.0.1
  10. - image: circleci/postgres:9.6.2
  11. environment:
  12. POSTGRES_USER: root
  13. POSTGRES_DB: <same name as in your settings.py default>
  14. POSTGRES_PASSWORD: ""
  15.  
  16. working_directory: ~/repo
  17.  
  18. steps:
  19. - checkout
  20.  
  21. - restore_cache:
  22. keys:
  23. - v1-dependencies-{{ checksum "requirements.txt" }}
  24. - v1-dependencies-
  25.  
  26. - run:
  27. name: install dependencies
  28. command: |
  29. python3 -m venv venv
  30. . venv/bin/activate
  31. pip install -r requirements-dev.txt
  32.  
  33. - save_cache:
  34. paths:
  35. - ./venv
  36. key: v1-dependencies-{{ checksum "requirements.txt" }}
  37.  
  38. - run:
  39. name: lint code
  40. command: |
  41. . venv/bin/activate
  42. flake8 <project package>
  43. isort --recursive --check-only --diff <project package> -sp tox.ini
  44.  
  45. - run:
  46. name: run tests
  47. command: |
  48. . venv/bin/activate
  49. python manage.py makemigrations --check --dry-run
  50. coverage run manage.py test
  51. codecov --token=<your private project token>
  52.  
  53. - store_artifacts:
  54. path: test-reports
  55. destination: test-reports
  56.  
  57. deploy:
  58. docker:
  59. - image: buildpack-deps:trusty-scm
  60.  
  61. working_directory: ~/repo
  62.  
  63. steps:
  64. - checkout
  65. - deploy:
  66. name: Eldarion Cloud
  67. command: |
  68. bin/ec/auth.sh
  69. bin/ec/deploy.sh staging
  70. bin/ec/slack-notify.sh staging
  71.  
  72. workflows:
  73. version: 2
  74. test-and-deploy:
  75. jobs:
  76. - test
  77. - deploy:
  78. requires:
  79. - test
  80. filters:
  81. branches:
  82. only: master
Add Comment
Please, Sign In to add comment