forked from Livit/Livit.Learn.EdX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
69 lines (59 loc) · 2.74 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
63
64
65
66
67
68
69
machine:
python:
version: 2.7.10
general:
artifacts:
- "reports"
- "test_root/log"
dependencies:
override:
- sudo apt-get update && sudo apt-get install libxmlsec1-dev
- npm install
- pip install setuptools
- pip install --exists-action w -r requirements/edx/paver.txt
# Mirror what paver install_prereqs does.
# After a successful build, CircleCI will
# cache the virtualenv at that state, so that
# the next build will not need to install them
# from scratch again.
- pip install --exists-action w -r requirements/edx/pre.txt
- pip install --exists-action w -r requirements/edx/github.txt
- pip install --exists-action w -r requirements/edx/local.txt
# HACK: within base.txt stevedore had a
# dependency on a version range of pbr.
# Install a version which falls within that range.
- pip install --exists-action w pbr==0.9.0
- pip install --exists-action w -r requirements/edx/base.txt
- pip install --exists-action w -r requirements/edx/paver.txt
- if [ -e requirements/edx/post.txt ]; then pip install --exists-action w -r requirements/edx/post.txt ; fi
- pip install coveralls==1.0
# Output the installed python packages to the console to help
# with troubleshooting any issues with python requirements.
- pip freeze
test:
override:
# Run tests for the system.
# all-tests.sh is the entry point for determining
# which tests to run.
# See the circleCI documentation regarding parallelism
# to understand how multiple containers can be used to
# run subsets of tests in parallel.
- ./scripts/all-tests.sh:
timeout: 900 # if a command runs this many seconds without output, kill it
parallel: true
post:
- mkdir -p $CIRCLE_TEST_REPORTS/junit
# Copy the junit results up to be consumed by circleci,
# but only do this if there actually are results.
# Note that the greater than zero comparison is doing a
# string compare, but that should be fine for our purposes here.
# Do this on each of the containers that were used in
# the build so that all results are consolidated.
- "if [ $(find reports -type f | wc -l) -gt 0 ] ; then cp -r reports/. $CIRCLE_TEST_REPORTS/junit ; fi":
parallel: true
# If you have enabled coveralls for your repo, configure your COVERALLS_REPO_TOKEN
# as an Environment Variable in the Project Settings on CircleCI, and coverage
# data will automatically be sent to coveralls. See https://coveralls.io/
# If you have not set up set up coveralls then the following statement will
# print a message but not affect the pass/fail status of the build.
- if [ -z $COVERALLS_REPO_TOKEN ]; then echo "Coveralls token not defined."; else coveralls; fi