Skip to content

Commit

Permalink
Adding an experimental Bazel task to travis
Browse files Browse the repository at this point in the history
  • Loading branch information
barancev committed Aug 27, 2019
1 parent 6e7805c commit 12d777d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ matrix:
- env: MARIONETTE=1 SELENIUM_BROWSER=firefox NPM=test
<<: *node
<<: *firefox-latest
- env: BZL="build //java/..."
<<: *java
- env: BUCK="build selenium-server-standalone java-small-tests chrome-test firefox-test legacy-firefox-test htmlunit-test ie-test opera-test java-small-tests //java/client/test/org/openqa/selenium/testing/drivers/..."
<<: *java
- env: BUCK="test //java/client/test/org/openqa/selenium/atoms:test"
Expand Down
3 changes: 3 additions & 0 deletions scripts/travis/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ echo -e "[ui]\n superconsole = disabled\n" >> .buckconfig.local

# buckw uses requests to download buck executable
pip install requests

curl -L -o bazelisk "https://github.com/bazelbuild/bazelisk/releases/download/v1.0/bazelisk-linux-amd64"
chmod +x bazelisk && sudo mv bazelisk /usr/local/bin
14 changes: 14 additions & 0 deletions scripts/travis/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,20 @@ if [[ ! -z "$BUCK" ]]; then
fi
fi

if [[ ! -z "$BZL" ]]; then
if [[ $BZL == test\ //javascript/* ]]; then
if [[ $TRAVIS_PULL_REQUEST == "false" ]] || git diff --name-only HEAD~1| grep '^javascript/' >/dev/null; then
bazelisk $BZL
fi
elif [[ $BZL == test\ * ]]; then
if [[ $TRAVIS_PULL_REQUEST == "false" ]] || git diff --name-only HEAD~1| grep '^java/' >/dev/null; then
bazelisk $BZL
fi
else
bazelisk $BZL
fi
fi

if [[ ! -z "$NPM" ]]; then
if [[ $TRAVIS_PULL_REQUEST == "false" ]] || git diff --name-only HEAD~1| grep '^javascript/' >/dev/null; then
./go node:atoms
Expand Down

0 comments on commit 12d777d

Please sign in to comment.