mirror of https://github.com/zulip/zulip.git
py3: Stop running on Python 2 in Travis.
This clears the way to dropping logic in lots of places for supporting Python 2.
This commit is contained in:
parent
aa0ecd79d6
commit
d968179e54
11
.travis.yml
11
.travis.yml
|
@ -43,9 +43,8 @@ env:
|
||||||
global:
|
global:
|
||||||
- BOTO_CONFIG=/tmp/nowhere
|
- BOTO_CONFIG=/tmp/nowhere
|
||||||
language: python
|
language: python
|
||||||
# We run all of our test suites for both Python 2.7 and 3.4, with the
|
# Our test suites generally run on Python 3.4, the version in
|
||||||
# exception of static analysis, which is just run once (and checks
|
# Ubuntu 14.04 trusty, which is the oldest OS release we support.
|
||||||
# against both Python versions).
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
# Travis will actually run the jobs in the order they're listed here;
|
# Travis will actually run the jobs in the order they're listed here;
|
||||||
|
@ -60,12 +59,6 @@ matrix:
|
||||||
env: TEST_SUITE=backend
|
env: TEST_SUITE=backend
|
||||||
- python: "3.4"
|
- python: "3.4"
|
||||||
env: TEST_SUITE=production
|
env: TEST_SUITE=production
|
||||||
- python: "2.7"
|
|
||||||
env: TEST_SUITE=frontend
|
|
||||||
- python: "2.7"
|
|
||||||
env: TEST_SUITE=backend
|
|
||||||
- python: "2.7"
|
|
||||||
env: TEST_SUITE=production
|
|
||||||
sudo: required
|
sudo: required
|
||||||
services:
|
services:
|
||||||
- docker
|
- docker
|
||||||
|
|
|
@ -19,19 +19,10 @@ LOG_PATH="../var/log/provision.log"
|
||||||
|
|
||||||
echo "PROVISIONING STARTING." >> $LOG_PATH
|
echo "PROVISIONING STARTING." >> $LOG_PATH
|
||||||
|
|
||||||
PROVISION_PATH="./lib/provision.py"
|
|
||||||
if [ -n "$TRAVIS" ]; then
|
|
||||||
# In CI, we let PATH provide the Python version.
|
|
||||||
PROVISION_CMD=("$PROVISION_PATH")
|
|
||||||
else
|
|
||||||
# In dev, we force Python 3.
|
|
||||||
PROVISION_CMD=(python3 "$PROVISION_PATH")
|
|
||||||
fi
|
|
||||||
|
|
||||||
# PYTHONUNBUFFERED is important to ensure that tracebacks don't get
|
# PYTHONUNBUFFERED is important to ensure that tracebacks don't get
|
||||||
# lost far above where they should be in the output.
|
# lost far above where they should be in the output.
|
||||||
export PYTHONUNBUFFERED=1
|
export PYTHONUNBUFFERED=1
|
||||||
"${PROVISION_CMD[@]}" "$@" 2>&1 | tee -a "$LOG_PATH"
|
python3 ./lib/provision.py "$@" 2>&1 | tee -a "$LOG_PATH"
|
||||||
failed=${PIPESTATUS[0]}
|
failed=${PIPESTATUS[0]}
|
||||||
|
|
||||||
if [ $failed = 1 ]; then
|
if [ $failed = 1 ]; then
|
||||||
|
|
|
@ -1,11 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
py_version="$(python -c 'import sys; print(sys.version_info[0])')"
|
source /srv/zulip-py3-venv/bin/activate
|
||||||
|
|
||||||
if [ "$py_version" == 2 ]; then
|
|
||||||
source /srv/zulip-venv/bin/activate
|
|
||||||
else
|
|
||||||
source /srv/zulip-py3-venv/bin/activate
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Using $VIRTUAL_ENV"
|
echo "Using $VIRTUAL_ENV"
|
||||||
|
|
Loading…
Reference in New Issue