Skip to content

Commit ec7e66c

Browse files
committed
Circle config
1 parent 10944d2 commit ec7e66c

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

.circleci/config.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Python CircleCI 2.0 configuration file
2+
#
3+
# Check https://circleci.com/docs/2.0/language-python/ for more details
4+
#
5+
version: 2
6+
jobs:
7+
build:
8+
docker:
9+
# specify the version you desire here
10+
# use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers`
11+
- image: circleci/python:3.6.1
12+
environment:
13+
DATABASE_URL: postgres://mable:1234@127.0.0.1/mable
14+
15+
# Specify service dependencies here if necessary
16+
# CircleCI maintains a library of pre-built images
17+
# documented at https://circleci.com/docs/2.0/circleci-images/
18+
- image: circleci/postgres:9.6.2-alpine
19+
environment:
20+
POSTGRES_USER: mable
21+
POSTGRES_PASSWORD: 1234
22+
POSTGRES_DB: mable
23+
24+
working_directory: ~/repo
25+
26+
steps:
27+
- checkout
28+
29+
# Download and cache dependencies
30+
- restore_cache:
31+
keys:
32+
- v1-dependencies-{{ checksum "setup.py" }}
33+
# fallback to using the latest cache if no exact match is found
34+
- v1-dependencies-
35+
36+
- run:
37+
name: install dependencies
38+
command: |
39+
python3 -m venv venv
40+
. venv/bin/activate
41+
python setup.py develop
42+
43+
- save_cache:
44+
paths:
45+
- ./venv
46+
key: v1-dependencies-{{ checksum "setup.py" }}
47+
48+
# run tests!
49+
# this example uses Django's built-in test-runner
50+
# other common Python testing frameworks include pytest and nose
51+
# https://pytest.org
52+
# https://nose.readthedocs.io
53+
- run:
54+
name: run tests
55+
command: |
56+
. venv/bin/activate
57+
pytest -v
58+
59+
- store_artifacts:
60+
path: test-reports
61+
destination: test-reports

0 commit comments

Comments
 (0)