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

Smarter Travis Builds #6208

Closed
titusfortner opened this issue Jul 26, 2018 · 4 comments · Fixed by #7111
Closed

Smarter Travis Builds #6208

titusfortner opened this issue Jul 26, 2018 · 4 comments · Fixed by #7111

Comments

@titusfortner
Copy link
Member

A PR on Travis was auto-canceled when someone committed to Master, which makes it hard to know that the PR didn't break anything. I thought we used to have it so that tests were only run when changes from a particular folder.

It shouldn't be too difficult (though perhaps time consuming to make sure it works correctly) to add a conditional using something like git diff --name-only HEAD~1 to check for what has changed to these tasks based on folder (python tests when changes in /py/, ruby tests when changes in /rb/, etc)

If we minimize what gets run, that should keep us from having to auto-cancel PR builds.

@barancev
Copy link
Member

Closed? Why? I liked this idea...

@titusfortner
Copy link
Member Author

I was just closing all of my stuff that I wasn't immediately working on. Perhaps I got too aggressive...

@titusfortner titusfortner reopened this Apr 16, 2019
@titusfortner
Copy link
Member Author

Maybe I can find someone at the SeConf Workshop tomorrow to do this one...

knmkr added a commit to knmkr/selenium that referenced this issue Apr 17, 2019
@knmkr
Copy link
Contributor

knmkr commented Apr 17, 2019

@titusfortner

Hi,

Based on the env defined in the config for Travis CI,

include:

I've added checks for file changes for test jobs as proposed in the description.

#7111

So far I've only tested it locally by running commands like below for javascript, java, py, and rb:

$ touch javascript/foo; git add javascript/foo; git commit -m 'wip'

$ cat test-travis-script.sh
#!/usr/bin/env bash

echo 'javascript case 1'
CHROME=1 SELENIUM_BROWSER=chrome NPM=test ./scripts/travis/script.sh

echo 'javascript case 2'
MARIONETTE=1 MOZ_HEADLESS=1 TASK="calcdeps" BUCK="test //javascript/atoms:atoms-firefox //javascript/webdriver:webdriver-firefox //javascript/selenium-atoms:selenium-atoms-firefox //javascript/selenium-core:selenium-core-firefox" ./scripts/travis/script.sh

echo 'java case 1'
CHROME=1 BUCK="test chrome-test" ./scripts/travis/script.sh

echo 'ruby case 1'
TASK=//rb:ff-esr-test ./scripts/travis/script.sh

echo 'python case 1'
TOXENV=flake8 ./scripts/travis/script.sh

echo 'done'

$ ./test-travis-script.sh

I was not sure if tests for cpp and dotnet run on Travis CI.

Do you think it covers all test commands run on CI? I'm no so sure at this moment.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants