config.yml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. # Specify service dependencies here if necessary
  13. # CircleCI maintains a library of pre-built images
  14. # documented at https://circleci.com/docs/2.0/circleci-images/
  15. # - image: circleci/postgres:9.4
  16. working_directory: ~/repo
  17. steps:
  18. - checkout
  19. # Download and cache dependencies
  20. - restore_cache:
  21. keys:
  22. - v1-dependencies-{{ checksum "requirements.txt" }}
  23. # fallback to using the latest cache if no exact match is found
  24. - v1-dependencies-
  25. - run:
  26. name: install dependencies
  27. command: |
  28. python3 -m venv venv
  29. . venv/bin/activate
  30. pip install -r requirements.txt
  31. - save_cache:
  32. paths:
  33. - ./venv
  34. key: v1-dependencies-{{ checksum "requirements.txt" }}
  35. # run tests!
  36. # this example uses Django's built-in test-runner
  37. # other common Python testing frameworks include pytest and nose
  38. # https://pytest.org
  39. # https://nose.readthedocs.io
  40. - run:
  41. name: run tests
  42. command: |
  43. . venv/bin/activate
  44. #python manage.py test
  45. - store_artifacts:
  46. path: test-reports
  47. destination: test-reports