-
Notifications
You must be signed in to change notification settings - Fork 7
/
circle.yml
52 lines (52 loc) · 1.86 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
version: 2
jobs:
build:
working_directory: ~/django-stdnumfiled
docker:
# CircleCI Python images available at: https://hub.docker.com/r/circleci/python/
- image: "circleci/python:3.6.4-stretch"
steps:
- restore_cache:
keys:
- "pyenv 3.7.4 2.7.16 3.6.9 3.5.7 v4"
- run:
name: "Installing pyenv"
command: |
sudo apt-get update
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev
sudo apt-get install -y libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev
sudo apt-get install -y xz-utils tk-dev libffi-dev liblzma-dev python-openssl git
[[ -d "$HOME/.pyenv" ]] || curl https://pyenv.run | bash
echo 'export PATH="/home/circleci/.pyenv/bin:$PATH"' > ~/.pyenv/load
echo 'eval "$(pyenv init -)"' >> ~/.pyenv/load
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.pyenv/load
- run:
name: "Installing Python versions"
command: |
source ~/.pyenv/load
pyenv install --skip-existing 3.7.4
pyenv install --skip-existing 3.6.9
pyenv install --skip-existing 3.5.7
pyenv install --skip-existing 2.7.16
pyenv global 3.7.4 2.7.16 3.6.9 3.5.7
- save_cache:
key: "pyenv 3.7.4 2.7.16 3.6.9 3.5.7 v3"
paths:
- ~/.pyenv
- checkout
- run:
name: "Installing tox"
command: |
source ~/.pyenv/load
pip install -e .[ci]
- run:
name: "Testing"
command: |
source ~/.pyenv/load
tox
- run:
name: "Uploading coverage"
command: |
source ~/.pyenv/load
./bin/cover
bash <(curl -s https://codecov.io/bash)