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

add electron to travis test matrix #848

Merged
merged 4 commits into from May 16, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 8 additions & 3 deletions .travis.yml
Expand Up @@ -22,6 +22,10 @@ env:
- TRAVIS_NODE_VERSION="10"
- TRAVIS_NODE_VERSION="11"
- TRAVIS_NODE_VERSION="12"
- TRAVIS_NODE_VERSION="lts/*" ELECTRON_VERSION="2.0.18"
- TRAVIS_NODE_VERSION="lts/*" ELECTRON_VERSION="3.1.9"
- TRAVIS_NODE_VERSION="lts/*" ELECTRON_VERSION="4.2.0"
- TRAVIS_NODE_VERSION="lts/*" ELECTRON_VERSION="5.0.1"
matrix:
exclude:
- os: osx
Expand All @@ -31,6 +35,7 @@ install:
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then export CXX=g++-4.8; fi
- $CXX --version
- if [[ $TRAVIS_NODE_VERSION == "0.8" ]]; then npm config set strict-ssl false; fi
- if [[ $(echo "$TRAVIS_NODE_VERSION < 4" | bc -l) ]]; then npm install npm@2 && mv node_modules npm && npm/.bin/npm --version && npm/.bin/npm install; else npm --version && npm install; fi
- node_modules/.bin/node-gyp rebuild --directory test
script: node_modules/.bin/tap --gc test/js/*-test.js
- if [[ -z "$ELECTRON_VERSION" && $(echo "$TRAVIS_NODE_VERSION < 4" | bc -l) == "1" ]]; then npm install npm@2 && mv node_modules npm && npm/.bin/npm --version && npm/.bin/npm install; else npm --version && npm install; fi
- if [[ -z "$ELECTRON_VERSION" ]]; then node_modules/.bin/node-gyp rebuild --directory test; else node_modules/.bin/node-gyp rebuild --target=v$ELECTRON_VERSION --dist-url=https://atom.io/download/electron --directory test; fi
script:
- if [[ -z "$ELECTRON_VERSION" ]]; then node_modules/.bin/tap --gc test/js/*-test.js; fi
Copy link
Collaborator

@mkrufky mkrufky Apr 25, 2019

Choose a reason for hiding this comment

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

It looks like this is just a build check, if we're not going to actually run the node.js/nan unit tests.

Personally, I'd love to see electron added to the test matrix, but it would make a lot more sense if we could actually run the tests. I don't know if there's a straight forward way to do this, or if we need to wrap them, maybe even create a separate set of tests for electron.....

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, just build tests.
Honestly speaking I have no idea what's actually needed to run tests with electron but I fear it's not that easy as run nodejs which is available on the CI machines.