summaryrefslogtreecommitdiff
path: root/.circleci/config.yml
blob: 493fd79b8c5a54bd94faa813a1957f66d65b6bdd (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
44
45
46
47
48
49
50
51
52
53
54
55
version: 2
jobs:
  macos-build:
    macos:
      xcode: "9.2.0"

    steps:
    - run: brew install pyenv readline xz

    - run: |-
        # https://circleci.com/docs/2.0/env-vars/#interpolating-environment-variables-to-set-other-environment-variables
        echo '
          export PYENV_ROOT="$HOME/.pyenv"
          export PATH="$PYENV_ROOT/bin:$PATH"
        ' >> $BASH_ENV

    - run: |-
        for py_ver in 3.6.4 3.5.4 3.4.7 pypy3.5-5.10.0
        do
          pyenv install "$py_ver" &
        done
        wait
    - run: pyenv global 3.6.4 3.5.4 3.4.7 pypy3.5-5.10.0

    - run: pip install tox tox-pyenv
    - checkout
    - run: tox -e py34,py35,py36,pypy3 -- -p no:sugar
    - store_test_results:
        path: .test-results
    - store_test_results:
        path: .test-results/pytest
    - store_artifacts:
        path: .test-results

  linux-build:
    docker:
    - image: randomknowledge/docker-pyenv-tox

    steps:
    - checkout
    - run: pip install tox
    - run: tox -e py34,py35,py36
    - store_test_results:
        path: .test-results
    - store_test_results:
        path: .test-results/pytest
    - store_artifacts:
        path: .test-results

workflows:
  version: 2
  test-linux-and-macos:
    jobs:
    - macos-build
    - linux-build