Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: add Python 3 tests to Travis CI #29196

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,18 @@ jobs:
- if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then
bash -x tools/lint-pr-commit-message.sh ${TRAVIS_PULL_REQUEST};
fi

- name: "Python 3 is EXPERIMENTAL"
language: node_js
node_js: "node"
install:
- pyenv global 3.7.1
Copy link
Member

@gengjiawen gengjiawen Aug 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not 3.7.4 since it's the latest ?

Copy link
Contributor Author

@cclauss cclauss Aug 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3.7.4 is not available on the pyenv on Travis CI. pyenv list --install

We might even need to temporarily downgrade to Python 3.6 because async is a reserved word in Python >= 3.7 and that messes with inspector_protocol/code_generator.py

- python3.7 -m pip install --upgrade pip
- make lint-py-build
script:
- NODE=$(which node) make lint lint-py
- python3.7 ./configure.py
- NODE=$(which node) make test
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could also prefix this with PYTHON=python3.7 to run tools/gyp_node.py and tools/test.py with Python 3 too. There's also an install target that could exercise tools/install.py, but maybe that can be added later. It'll be important for making sure that release builds can be done with Python 3.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Will add these after make test goes green.


allow_failures:
- name: "Python 3 is EXPERIMENTAL"