summaryrefslogtreecommitdiff
path: root/.circleci/config.yml
blob: 30977386a5f332012ed3edac624bb523ad63eb72 (plain)
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
version: 2
jobs:
  build:
    docker:
      # specify the version you desire here
      # use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers`
      - image: circleci/python:3.6.1

      # Specify service dependencies here if necessary
      # CircleCI maintains a library of pre-built images
      # documented at https://circleci.com/docs/2.0/circleci-images/
      # - image: circleci/postgres:9.4

    working_directory: ~/repo

    steps:
      - checkout

      # Download and cache dependencies
      - restore_cache:
          keys:
          - v1-dependencies-{{ checksum "setup.py" }}
          # fallback to using the latest cache if no exact match is found
          - v1-dependencies-

      - run:
          name: install dependencies
          command: |
            python3.6 -m venv .venv
            . .venv/bin/activate
            pip install -e .

      - save_cache:
          paths:
            - ./.venv
          key: v1-dependencies-{{ checksum "setup.py" }}

      # run tests!
      - run:
          name: run tests
          command: |
            . .venv/bin/activate
            python setup.py pytest