Skip to content

Commit 98ac35e

Browse files
committed
created circleci config
1 parent f281932 commit 98ac35e

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.circleci/config.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
version: 2
2+
jobs:
3+
build:
4+
working_directory: ~/django-api
5+
docker:
6+
- image: circleci/python:3.6.4
7+
environment:
8+
PIPENV_VENV_IN_PROJECT: true
9+
DJANGO_SECRET_KEY: qAhCPjJP5wrixDBf0qhQd62TxJ0CirclECi
10+
DJANGO_DEBUG: True
11+
DB_POSTGRES_DATABASE_NAME: circle_test
12+
DB_POSTGRES_USERNAME: root
13+
DB_POSTGRES_PASSWORD: ''
14+
DB_POSTGRES_HOSTNAME: localhost
15+
DB_POSTGRES_PORT: 5432
16+
API_SERVICES_URL: http://localhost:9000/services/api/
17+
FRONTEND_APP_URL: http://localhost:3000/
18+
19+
- image: circleci/postgres:9.6.2
20+
environment:
21+
POSTGRES_USER: root
22+
POSTGRES_DB: circle_test
23+
POSTGRES_PASSWORD: ''
24+
steps:
25+
- checkout
26+
- run: sudo chown -R circleci:circleci /usr/local/bin
27+
- run: sudo chown -R circleci:circleci /usr/local/lib/python3.6/site-packages
28+
- restore_cache:
29+
key: deps9-{{ .Branch }}-{{ checksum "requirements.txt" }}
30+
- run:
31+
command: |
32+
sudo pip install pipenv
33+
pipenv install
34+
- save_cache:
35+
key: deps9-{{ .Branch }}-{{ checksum "requirements.txt" }}
36+
paths:
37+
- ".venv"
38+
- "/usr/local/bin"
39+
- "/usr/local/lib/python3.6/site-packages"
40+
- run:
41+
command: |
42+
pipenv run "python manage.py test"

0 commit comments

Comments
 (0)