Skip to content

Commit

Permalink
Default in CI to Py3, not Py2
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric-Arellano committed Dec 21, 2018
1 parent 97f26bc commit f8799c6
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 25 deletions.
36 changes: 18 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,92 +203,92 @@ matrix:
- <<: *default_test_config
name: "Py2 - Unit tests for pants and pants-plugins"
script:
- ./build-support/bin/travis-ci.sh -lp
- ./build-support/bin/travis-ci.sh -2lp

- <<: *default_test_config
name: "Py3 - Unit tests for pants and pants-plugins"
script:
- ./build-support/bin/travis-ci.sh -3lp
- ./build-support/bin/travis-ci.sh -lp

- <<: *default_test_config
name: "Py2 - Python contrib tests"
script:
- ./build-support/bin/travis-ci.sh -n
- ./build-support/bin/travis-ci.sh -2n

- <<: *default_test_config
name: "Py3 - Python contrib tests"
script:
- ./build-support/bin/travis-ci.sh -3n
- ./build-support/bin/travis-ci.sh -n

- <<: *default_test_config
name: "Integration tests for pants - shard 1"
script:
- ./build-support/bin/travis-ci.sh -c3 -i 0/7
- ./build-support/bin/travis-ci.sh -c -i 0/7

- <<: *default_test_config
name: "Integration tests for pants - shard 2"
script:
- ./build-support/bin/travis-ci.sh -c3 -i 1/7
- ./build-support/bin/travis-ci.sh -c -i 1/7

- <<: *default_test_config
name: "Integration tests for pants - shard 3"
script:
- ./build-support/bin/travis-ci.sh -c3 -i 2/7
- ./build-support/bin/travis-ci.sh -c -i 2/7

- <<: *default_test_config
name: "Integration tests for pants - shard 4"
script:
- ./build-support/bin/travis-ci.sh -c3 -i 3/7
- ./build-support/bin/travis-ci.sh -c -i 3/7

- <<: *default_test_config
name: "Integration tests for pants - shard 5"
script:
- ./build-support/bin/travis-ci.sh -c3 -i 4/7
- ./build-support/bin/travis-ci.sh -c -i 4/7

- <<: *default_test_config
name: "Integration tests for pants - shard 6"
script:
- ./build-support/bin/travis-ci.sh -c3 -i 5/7
- ./build-support/bin/travis-ci.sh -c -i 5/7

- <<: *default_test_config
name: "Integration tests for pants - shard 7"
script:
- ./build-support/bin/travis-ci.sh -c3 -i 6/7
- ./build-support/bin/travis-ci.sh -c -i 6/7

- <<: *default_cron_test_config
name: "Integration tests for pants (Python 2) - shard 1"
script:
- ./build-support/bin/travis-ci.sh -c -i 0/7
- ./build-support/bin/travis-ci.sh -c2 -i 0/7

- <<: *default_cron_test_config
name: "Integration tests for pants (Python 2) - shard 2"
script:
- ./build-support/bin/travis-ci.sh -c -i 1/7
- ./build-support/bin/travis-ci.sh -c2 -i 1/7

- <<: *default_cron_test_config
name: "Integration tests for pants (Python 2) - shard 3"
script:
- ./build-support/bin/travis-ci.sh -c -i 2/7
- ./build-support/bin/travis-ci.sh -c2 -i 2/7

- <<: *default_cron_test_config
name: "Integration tests for pants (Python 2) - shard 4"
script:
- ./build-support/bin/travis-ci.sh -c -i 3/7
- ./build-support/bin/travis-ci.sh -c2 -i 3/7

- <<: *default_cron_test_config
name: "Integration tests for pants (Python 2) - shard 5"
script:
- ./build-support/bin/travis-ci.sh -c -i 4/7
- ./build-support/bin/travis-ci.sh -c2 -i 4/7

- <<: *default_cron_test_config
name: "Integration tests for pants (Python 2) - shard 6"
script:
- ./build-support/bin/travis-ci.sh -c -i 5/7
- ./build-support/bin/travis-ci.sh -c2 -i 5/7

- <<: *default_cron_test_config
name: "Integration tests for pants (Python 2) - shard 7"
script:
- ./build-support/bin/travis-ci.sh -c -i 6/7
- ./build-support/bin/travis-ci.sh -c2 -i 6/7

# Rust on linux
- <<: *linux_with_fuse
Expand Down
13 changes: 6 additions & 7 deletions build-support/bin/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ function usage() {
cat <<EOF
Runs commons tests for local or hosted CI.
Usage: $0 (-h|-3fxbkmrjlpuneycitzs)
Usage: $0 (-h|-2fxbkmrjlpuneycitzs)
-h print out this help message
-3 After pants is bootstrapped, set --python-setup-interpreter-constraints such that any
python tests run with Python 3.
-2 Run using Python 2 (defaults to using Python 3).
-f run python code formatting checks
-x run bootstrap clean-all (assume bootstrapping from a
fresh clone)
Expand Down Expand Up @@ -64,12 +63,12 @@ bootstrap_compile_args=(
python_unit_shard="0/1"
python_contrib_shard="0/1"
python_intg_shard="0/1"
python_three="false"
python_two="false"

while getopts "h3fxbkmrjlpeasu:ny:ci:tz" opt; do
while getopts "h2fxbkmrjlpeasu:ny:ci:tz" opt; do
case ${opt} in
h) usage ;;
3) python_three="true" ;;
2) python_two="true" ;;
f) run_pre_commit_checks="true" ;;
x) run_bootstrap_clean="true" ;;
b) run_bootstrap="false" ;;
Expand Down Expand Up @@ -132,7 +131,7 @@ if [[ "${run_bootstrap:-true}" == "true" ]]; then
fi

# NB: Ordering matters here. We (currently) always bootstrap a Python 2 pex.
if [[ "${python_three:-false}" == "true" ]]; then
if [[ "${python_two:-false}" == "false" ]]; then
banner "Setting interpreter constraints to Python 3!"
export PANTS_PYTHON_SETUP_INTERPRETER_CONSTRAINTS='["CPython>=3.6,<4"]'
else
Expand Down

0 comments on commit f8799c6

Please sign in to comment.