-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
62 lines (59 loc) · 2.25 KB
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# This circle.yml file does some basic testing on CI for the boilerplate itself.
# When using the boilerplate this file will not be used, proj_circle.yml is used
# instead.
machine:
python:
version: 3.6.0
node:
version: 6.1.0
dependencies:
post:
- pip install django
- pip install virtualenv
- django-admin startproject testproject --extension py,yml,json --name Procfile,README.md --template=.
test:
override:
- virtualenv testproject/venv
- source testproject/venv/bin/activate
- pip install -r requirements-to-freeze.txt:
pwd: testproject
- npm update --save:
pwd: testproject
- npm update --save-dev:
pwd: testproject
# hotfix for #133
- |
sed -i 's/"bootstrap-loader": "^2.1.0"/"bootstrap-loader": "2.1.0"/g' testproject/package.json
- npm install:
pwd: testproject
# npm ls will error on dependencies errors
- npm ls:
pwd: testproject
- cp testproject/testproject/settings/local.py.example testproject/testproject/settings/local.py
- echo 'DJANGO_SETTINGS_MODULE="testproject.settings.local"' > testproject/.env
- python manage.py makemigrations:
pwd: testproject
- python manage.py migrate:
pwd: testproject
- python manage.py test:
pwd: testproject
- prospector:
pwd: testproject
- python manage.py has_missing_migrations:
pwd: testproject
- SECRET_KEY="$(python -c "import uuid; print(uuid.uuid4().hex + uuid.uuid4().hex)")" SENDGRID_USERNAME='foo' SENDGRID_PASSWORD='password' DJANGO_SETTINGS_MODULE='testproject.settings.production' DATABASE_URL='sqlite:///' ALLOWED_HOSTS='.example.org' REDIS_URL='redis://' python manage.py check --deploy --fail-level WARNING:
pwd: testproject
- npm run lint:
pwd: testproject
- npm run build:
pwd: testproject
deployment:
release:
branch: master
commands:
- mv proj_circle.yml circle.yml
- git checkout -b boilerplate-release
- git add circle.yml
- git rm proj_circle.yml
- GIT_COMMITTER_NAME="Vinta Software" GIT_COMMITTER_EMAIL="contact@vinta.com.br" git commit -m "Replacing circle.yml" --author "Vinta Software <contact@vinta.com.br>"
- git push origin boilerplate-release --force