Skip to content

Commit ed3b42d

Browse files
authored
Merge pull request #5062 from StackStorm/fix-py3-dev-default
Fix travis jobs after making python3 as default for development
2 parents 7de6560 + 6cda953 commit ed3b42d

File tree

4 files changed

+47
-13
lines changed

4 files changed

+47
-13
lines changed

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ jobs:
3838
# scripts/travis/run-nightly-make-task-if-exists.sh
3939
- name: "Unit Tests (Python 2.7 MongoDB 4.0)"
4040
python: 2.7
41-
env: TASK=ci-unit CACHE_NAME=py2 COMMAND_THRESHOLD=700
41+
env: TASK=ci-unit CACHE_NAME=py2 PYTHON_VERSION=python2.7 COMMAND_THRESHOLD=700
4242

4343
- name: "Integration Tests (Python 2.7)"
4444
python: 2.7
45-
env: TASK=ci-integration CACHE_NAME=py2 COMMAND_THRESHOLD=700
45+
env: TASK=ci-integration CACHE_NAME=py2 PYTHON_VERSION=python2.7 COMMAND_THRESHOLD=700
4646

4747
- name: "Lint Checks, Packs Tests (Python 3.6)"
4848
python: 3.6
49-
env: TASK="ci-checks ci-packs-tests" CACHE_NAME=py3 COMMAND_THRESHOLD=430
49+
env: TASK="ci-checks ci-packs-tests" CACHE_NAME=py3 PYTHON_VERSION=python3.6 COMMAND_THRESHOLD=430
5050

5151
- name: "Unit Tests, Pack Tests (Python 3.6)"
5252
python: 3.6

Makefile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ else
1515
VIRTUALENV_COMPONENTS_DIR ?= virtualenv-components
1616
endif
1717

18-
PYTHON_VERSION ?= $(shell if [ -z "`which python3.6`" ]; then which python2.7; else which python3.6; fi)
18+
PYTHON_VERSION ?= $(shell if [ -z "`which python3.6`" ]; then echo "python2.7"; else echo "python3.6"; fi)
1919

2020
BINARIES := bin
2121

@@ -50,7 +50,12 @@ COMPONENTS_TEST_MODULES_COMMA := $(subst $(space_char),$(comma),$(COMPONENTS_TES
5050
COVERAGE_GLOBS := .coverage.unit.* .coverage.integration.*
5151
COVERAGE_GLOBS_QUOTED := $(foreach glob,$(COVERAGE_GLOBS),'$(glob)')
5252

53-
REQUIREMENTS := test-requirements.txt requirements.txt
53+
ifeq ($(PYTHON_VERSION),python2.7)
54+
REQUIREMENTS := test-requirements-py27.txt requirements.txt
55+
else
56+
REQUIREMENTS := test-requirements.txt requirements.txt
57+
endif
58+
5459
# Pin common pip version here across all the targets
5560
# Note! Periodic maintenance pip upgrades are required to be up-to-date with the latest pip security fixes and updates
5661
PIP_VERSION ?= 20.0.2
@@ -543,10 +548,9 @@ requirements: virtualenv .requirements .sdist-requirements install-runners insta
543548
fi
544549

545550
# Install requirements
546-
#
547551
for req in $(REQUIREMENTS); do \
548-
echo "Installing $$req..." ; \
549-
$(VIRTUALENV_DIR)/bin/pip install $(PIP_OPTIONS) -r $$req ; \
552+
echo "Installing $$req..." ; \
553+
$(VIRTUALENV_DIR)/bin/pip install $(PIP_OPTIONS) -r $$req ; \
550554
done
551555

552556
# Install st2common package to load drivers defined in st2common setup.py

test-requirements-py27.txt

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# NOTE: codecov only supports coverage==4.5.2
2+
coverage==4.5.2
3+
pep8==1.7.1
4+
st2flake8==0.1.0
5+
astroid==1.6.5
6+
pylint==1.9.4
7+
pylint-plugin-utils>=0.4
8+
bandit==1.5.1
9+
ipython<6.0.0
10+
mock==3.0.5
11+
nose>=1.3.7
12+
tabulate
13+
unittest2
14+
sphinx==1.7.9
15+
sphinx-autobuild
16+
# nosetests enhancements
17+
rednose
18+
nose-timer==0.7.5
19+
# splitting tests run on a separate CI machines
20+
nose-parallel==0.3.1
21+
# Required by st2client tests
22+
pyyaml==5.1.2
23+
RandomWords
24+
gunicorn==19.9.0
25+
psutil==5.6.6
26+
webtest==2.0.25
27+
rstcheck>=3.3.1,<3.4
28+
tox==3.14.1
29+
pyrabbit
30+
# Since StackStorm v2.8.0 we now use cryptography instead of keyczar, but we still have some tests
31+
# which utilize keyczar and ensure new cryptography code is fully compatible with keyczar code
32+
# (those tests only run under Python 2.7 since keyczar doesn't support Python 3.x).
33+
# See https://github.com/StackStorm/st2/pull/4165
34+
python-keyczar
35+
pip-tools # For pip-compile, to check for version conflicts

test-requirements.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,4 @@ webtest==2.0.25
2828
rstcheck>=3.3.1,<3.4
2929
tox==3.14.1
3030
pyrabbit
31-
# Since StackStorm v2.8.0 we now use cryptography instead of keyczar, but we still have some tests
32-
# which utilize keyczar and ensure new cryptography code is fully compatible with keyczar code
33-
# (those tests only run under Python 2.7 since keyczar doesn't support Python 3.x).
34-
# See https://github.com/StackStorm/st2/pull/4165
35-
python-keyczar
3631
pip-tools # For pip-compile, to check for version conflicts

0 commit comments

Comments
 (0)