Skip to content

Commit 47717b1

Browse files
authored
build: specify Python version once for all tests
Extracted from #28537 for shorter review cycle. This makes it easier to experiment with new versions of Python as they become available on the Travis CI platform.
1 parent 11c52d9 commit 47717b1

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

.travis.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ x-ccache-setup-steps: &ccache-setup-steps
77
os: linux
88
dist: xenial
99
language: cpp
10+
env:
11+
global:
12+
- PYTHON_VERSION="2.7.15"
1013
jobs:
1114
include:
1215
- stage: "Compile"
@@ -20,7 +23,7 @@ jobs:
2023
- g++-6
2124
install: *ccache-setup-steps
2225
script:
23-
- pyenv global 2.7.15
26+
- pyenv global ${PYTHON_VERSION}
2427
- ./configure
2528
- make -j2 -C out V=1 v8
2629

@@ -34,7 +37,7 @@ jobs:
3437
- g++-6
3538
install: *ccache-setup-steps
3639
script:
37-
- pyenv global 2.7.15
40+
- pyenv global ${PYTHON_VERSION}
3841
- ./configure
3942
- make -j2 V=1
4043
- cp out/Release/node /home/travis/.ccache
@@ -47,7 +50,7 @@ jobs:
4750
- mkdir -p out/Release
4851
- cp /home/travis/.ccache/node out/Release/node
4952
script:
50-
- pyenv global 2.7.15
53+
- pyenv global ${PYTHON_VERSION}
5154
- python tools/test.py -j 2 -p dots --report --mode=release --flaky-tests=dontcare default
5255

5356
- name: "Test C++ Suites"
@@ -63,7 +66,7 @@ jobs:
6366
- cp /home/travis/.ccache/cctest out/Release/cctest
6467
- touch config.gypi
6568
script:
66-
- pyenv global 2.7.15
69+
- pyenv global ${PYTHON_VERSION}
6770
- out/Release/cctest
6871
- make -j1 V=1 test/addons/.buildstamp test/js-native-api/.buildstamp test/node-api/.buildstamp
6972
- python tools/test.py -j 2 -p dots --report --mode=release --flaky-tests=dontcare addons js-native-api node-api
@@ -72,7 +75,7 @@ jobs:
7275
language: node_js
7376
node_js: "node"
7477
install:
75-
- pyenv global 2.7.15
78+
- pyenv global ${PYTHON_VERSION}
7679
- make lint-py-build || true
7780
script:
7881
- NODE=$(which node) make lint lint-py

0 commit comments

Comments
 (0)