circle.yml 2.68 KB
Newer Older
1 2
machine:
  python:
3
    version: 2.7.10
4 5 6 7 8 9

general:
  artifacts:
    - "reports"
    - "test_root/log"

10 11
dependencies:
  override:
12 13 14
    - npm install

    - pip install setuptools
15
    - pip install --exists-action w -r requirements/edx/paver.txt
16 17 18 19 20 21

    # 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.
22
    - pip install --exists-action w -r requirements/edx/pre.txt
23 24
    - pip install --exists-action w -r requirements/edx/github.txt
    - pip install --exists-action w -r requirements/edx/local.txt
25 26 27 28

    # HACK: within base.txt stevedore had a
    # dependency on a version range of pbr.
    # Install a version which falls within that range.
29 30
    - pip install  --exists-action w pbr==0.9.0
    - pip install --exists-action w -r requirements/edx/base.txt
31
    - pip install --exists-action w -r requirements/edx/paver.txt
32
    - if [ -e requirements/edx/post.txt ]; then pip install --exists-action w -r requirements/edx/post.txt ; fi
33

34
    - pip install coveralls==1.0
35

36 37 38 39
    # Output the installed python packages to the console to help
    # with troubleshooting any issues with python requirements.
    - pip freeze

40 41
test:
  override:
42 43 44 45 46 47 48
    # 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:
49
        timeout: 900  # if a command runs this many seconds without output, kill it
50 51 52 53 54 55 56 57 58 59 60
        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":
61
        parallel: true
62 63 64 65 66 67 68

    # 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