-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Description
CircleCI builds often don't correctly detect that they are on a PR. Currently the only way to know whether or not the service tests ran is to inspect the build logs.
That's because there is no way to reliably distinguish branch and PR builds in CircleCI.
Somtimes the cause is having CircleCI set up on the fork where the PR originates, triggering a branch build ahead of time, though we've also had cases where this happened on forks without CircleCI. Plus Dependabot branches are never on a fork.
As it turns out, there is a workaround suggested by Danger: configure CircleCI to run only on PRs.
That would necessitate either:
- A separate CI service – or simply a separate repo – to run the daily tests
- A PR-triggered bot that triggers the service-test builds on Circle programmatically
- A cron-triggered bot that triggers the nightly Circle build programmatically
I experimented in #1936 with a radically different alternative, which is to specify the affected services in the commit history. This has an advantage of making development a bit easier, but it didn't really pan out. Maybe that work could be harvested for a dev-only tool.