Skip to content

Commit 33c25f5

Browse files
committed
circleci build and test
1 parent 9104d7e commit 33c25f5

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.circleci/config.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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+
- image: circleci/python:3.5
11+
12+
working_directory: ~/repo
13+
14+
steps:
15+
- checkout
16+
17+
# Download and cache dependencies
18+
- restore_cache:
19+
keys:
20+
- v1-dependencies-{{ checksum "requirements.txt" }}
21+
# fallback to using the latest cache if no exact match is found
22+
- v1-dependencies-
23+
24+
- run:
25+
name: install dependencies
26+
command: |
27+
python3 -m venv venv
28+
. venv/bin/activate
29+
pip install -r requirements_stub.txt
30+
31+
- save_cache:
32+
paths:
33+
- ./venv
34+
key: v1-dependencies-{{ checksum "requirements_stub.txt" }}
35+
36+
# run tests!
37+
# this example uses Django's built-in test-runner
38+
# other common Python testing frameworks include pytest and nose
39+
# https://pytest.org
40+
# https://nose.readthedocs.io
41+
- run:
42+
name: run tests
43+
command: |
44+
. venv/bin/activate
45+
python -m unittest test/*.py > test/test-report.txt
46+
47+
- store_artifacts:
48+
path: test/*.txt
49+
destination: test-reports
50+

0 commit comments

Comments
 (0)