style-analyzer
style-analyzer copied to clipboard
Scheduler for long running tests in travis
Make a schedule to launch long-running tests during the weekends so we know if something is failing.
@warenlg You should do this once you pass the long tests.
To give some feedback on my experience last time I tried it:
- travis has no option to schedule a cron at a given time every week. It is possible however to create the cron at the time you want and it should repeat in the future weeks around that time (this is obviously really annoying since it means doing it on a sunday for us)
- last time I checked I saw 2 ways to enable long tests in the cron:
- conditional stages or jobs, in particular there is a
type = croncondition that should be usable to filter on crons only. - environment variables (
TRAVIS_EVENT_TYPEis set tocronduring cron jobs).
- conditional stages or jobs, in particular there is a
- we should not hardcode anything in the tests themselves but rather edit
.travis.ymlto setLONG_TESTSappropriately with one method or the other.
I created a cron job to run weekly. I also added "do not run if there was a build in the last 24 hours". This should be fine for now. So what's left is to check TRAVIS_EVENT_TYPE in script and export LONG_TESTS=1 if in cron.