-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildspec.yml
60 lines (58 loc) · 2.03 KB
/
buildspec.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
53
54
55
56
57
58
59
60
version: 0.2
env:
shell: bash
variables:
SHELL: /bin/bash
AWS_DEFAULT_REGION: eu-central-1
USER: "aws_code_build"
ENV: "dev"
PIPENV_NOSPIN: 1
phases:
install:
runtime-versions:
python: 3.7
commands:
- echo "Installing different python versions"
- apt-get update -qq
- apt-get install -yqq python3-pip python2.7 python2.7-dev python3.8 python3.9
build:
commands:
# For python 2.7 we need to have a virtualenv in order to have pip and to install the packages
- virtualenv -p python2.7 .venv
# each command in buildspec is run in a separate shell, therefore below we put the whole
# python2.7 into one command in order to activate the venv in this shell and run the test
# inside the venv
- |
. .venv/bin/activate
python --version
pip install -qq flake8 future nose coveralls
echo "Runs flake8..."
python -m flake8 esrijson tests
echo "Runs coverage"
python -m coverage run --source=esrijson setup.py test
python -m coverage report -m
deactivate
# Python 3.7
- python3.7 --version
- python3.7 -m pip install -qq flake8 future nose coveralls
- echo "Runs flake8..."
- python3.7 -m flake8 esrijson tests
- echo "Runs coverage"
- python3.7 -m coverage run --source=esrijson setup.py test
- python3.7 -m coverage report -m
# Python 3.8
- python3.8 --version
- python3.8 -m pip install -qq flake8 future nose coveralls
- echo "Runs flake8..."
- python3.8 -m flake8 esrijson tests
- echo "Runs coverage"
- python3.8 -m coverage run --source=esrijson setup.py test
- python3.8 -m coverage report -m
# Python 3.9
- python3.9 --version
- python3.9 -m pip install -qq flake8 future nose coveralls
- echo "Runs flake8..."
- python3.9 -m flake8 esrijson tests
- echo "Runs coverage"
- python3.9 -m coverage run --source=esrijson setup.py test
- python3.9 -m coverage report -m