Combine cron-scheduled builds checks about github changes

I’ve asked about this a while ago and now that Travis-CI is restricting the available free build minutes to all accounts, this feature becomes even more important.

The problem is that, AFAIK, currently it’s not possible to set up a build schedule on the two conditions of triggering it periodically, let’s say once a day, and also trigger it only if there have been changes since the last build (ie, commits on GitHub).

As you can see, implementing this feature is pretty easy and indeed I’ve done it in many of my build scripts. However, having it directly available on Travis settings (under the ‘cron job’ section) would obviously be much better for several reasons:

  • less redundancy, less copy-pasted boilerplate code
  • it wouldn’t be necessary to start a VM just to know there’s nothing to do today
    • which, in turn, would be good both for the Travis infrastructure (resource saves) and the users (credit saves)
  • the build history would be cleaner: with the above trick, you see a lot of “success builds” that lasted a few seconds and which conceptually, are not actual builds.

So, this is to propose to realise such a feature and I hope you’ll like it.

Then something else will need to be checking whatever condition you came up with :slight_smile: . Currently, NOTHING clones your repo to be able to check anything in it before a build starts :slight_smile:

You might be interested in this FR that would alow to run arbitrary user code early in the build:

Run a chunk of user code before the stock installation logic

Thanks for your reply,

I see the problem. Maybe is it possible to check GH changes via some API?

I agree the proposed pre-installation handler is would be useful.