Commit Graph

241 Commits (c47834aa5c4365005ab8ccdce7e0953423f6bc32)

Author SHA1 Message Date
Dawid Dziurla 79d74f8768
workflows: set dispatch type to 'Publish *' (#57557)
With `brew pr-publish` setting the dispatch' event type (name) to `Publish ##{PR}`,
we should tighten the dispatch type in workflow file too.
2020-07-06 21:16:50 +02:00
Dustin Rodrigues c0f2ab8752
workflows/tests: only run on homebrew-core (#55955) 2020-07-06 13:01:06 +01:00
Bo Anderson af4d3907b9
workflows/tests: separate log artefact (#57375) 2020-07-06 09:12:16 +01:00
Dawid Dziurla aadf808bc2
workflows: use more Homebrew actions (#57429) 2020-07-04 12:24:04 +02:00
Jonathan Chang f600359110 workflows: use PAT instead of default GITHUB_TOKEN
Should prevent errors like:

Error: [{"type"=>"FORBIDDEN", "path"=>["repository", "pullRequest", "reviews", "nodes", 0, "author", "email"], "extensions"=>{"saml_failure"=>false}, "locations"=>[{"line"=>6, "column"=>27}], "message"=>"Resource not accessible by integration"}]

https://github.com/Homebrew/homebrew-core/runs/826063506?check_suite_focus=true#step:7:20
2020-07-01 21:16:15 +10:00
Dawid Dziurla b37dd49593
workflows: use git-user-config action (#57138) 2020-06-30 11:39:24 +02:00
Mike McQuaid 102f98b0cd
workflows/tests: cleanup bottles before builds. (#57086)
This should be handled by the cleanup step but, if it isn't run for
whatever reason, let's cleanup anyway.
2020-06-29 16:33:42 +01:00
Dawid Dziurla 4501ee0d44 workflows: use git-try-push action
Closes #57067.

Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>
2020-06-29 14:06:31 +00:00
Dawid Dziurla e337444f11
workflows: remove extra space 2020-06-20 12:11:06 +02:00
Dawid Dziurla 77babe22b6
workflows: run jobs on ubuntu VMs instead containers (#55126)
should be faster
2020-05-22 18:53:05 +02:00
Mike McQuaid f7f14cb527
workflows/tests: don't update-reset homebrew/core. (#54644)
This shouldn't be necessary as there's a slimmer fetch happening below.
2020-05-13 11:22:44 +01:00
Bo Anderson a17a5e2e3d
workflows/tests: fix for pre-installed Linuxbrew (#54626) 2020-05-12 22:13:03 +01:00
Dawid Dziurla 8417673871
workflows: dismiss reviews if bottle publish failed (#54324)
Reviews could be automatically dismissed on new commits pushed (there is
an option for that in repository settings on Github). That is not the
case for labels. They remain attached to a PR, even when new commits are
pushed. This is undesirable and creates security concerns, because
someone could introduce untested code just before the automerge happens.
2020-05-09 10:57:11 +02:00
Mike McQuaid d81fea0b7b
workflows/tests: tweak caching (#54369)
Avoid setup.rb being incorrectly cached.
2020-05-07 17:45:05 +01:00
Dawid Dziurla 295336ad3c
workflows: more appropriate step name 2020-05-05 13:49:47 +02:00
Dawid Dziurla cb374ce51a
workflows: git push with backoff
ported from linuxbrew-core
2020-05-05 13:41:46 +02:00
EricFromCanada f294cea9e5 actions: remove generate_formulae.brew.sh_data.yml
Closes #54119.

Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>
2020-05-04 20:06:01 +00:00
Jonathan Chang 0d5644a597 workflows: fix case 2020-05-02 23:22:06 +10:00
Jonathan Chang dfeab962a4 workflows: fix syntax 2020-05-02 23:17:24 +10:00
Jonathan Chang 4ef1abba43 workflows: also post comment on cancellation 2020-05-02 23:12:29 +10:00
Mike McQuaid 433cedc2bd
workflows/tests: cleanup tapping. (#54072)
- Don't auto-update (can mess with branches)
- Don't need to `update-reset` as `test-bot` isn't in Actions images
2020-05-01 11:41:31 +01:00
Mike McQuaid dd523db64c
workflows/tests: check tap_syntax on Linux too. (#54046)
We want to make sure all formulae are readable and pass style checks on
both macOS and Linux.

Why Linux? We're doing increasing numbers of things on Linux (bottle
uploads, formulae.brew.sh generation, etc.) and can no longer have
homebrew-core only work on macOS.

This means that changes that make formulae unreadable on Linux will need
to be fixed (e.g. https://github.com/Homebrew/brew/pull/7470) before the
formula changes are merged.

As a nice side-effect: this should make life easier for linuxbrew-core
maintainers.
2020-05-01 09:16:55 +01:00
Bo Anderson c6fe159082 workflows/publish-commit-bottles: increase retry count 2020-04-28 20:11:02 +01:00
Bo Anderson 2dec193d88
workflows/scheduled: don’t run on forks (#53880) 2020-04-28 12:34:16 +01:00
Bo Anderson 1b758951e8
workflows/tests: run tap_syntax on master push (#53842)
workflows/tests: run tap_syntax on master push.

Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2020-04-28 11:28:33 +01:00
Jonathan Chang dc8c20150a
workflows: don't ping BrewTestBot on schedule (#53827) 2020-04-27 21:04:07 +10:00
Mike McQuaid e4fa680502 workflows/tests: move tap_syntax checks to hosted workers.
We have more hosted workers, this avoids running them three times and
generally saves our self-hosted workers for jobs that aren't too broken.
2020-04-27 11:25:50 +01:00
Issy Long 48798a1014
publish-commit-bottles: Revert 7dcd5e2 and a7ce130 (#53801)
- The "potentially fix syntax" commit did not fix it.
- Revert to make `brew pr-publish` work again, so we can ship software
  to users.
- Dinner calls, and even though we could probably do an `if` in the main
  `script` code, I don't trust myself to write JS well enough after this!
2020-04-26 20:35:47 +01:00
Issy Long a7ce1303b8
publish-commit-bottles: Fix syntax? (#53800)
- Sorry folks, 7dcd5e2be6 was bad:

> The workflow is not valid.
> .github/workflows/publish-commit-bottles.yml (Line: 31, Col: 13):
> Unrecognized named-value: 'context'. Located at position 1 within
> expression: context.actor != "BrewTestBot"

- Maybe if it does the `if` after the `uses`, it'll know what `context`
  is?
2020-04-26 20:26:34 +01:00
Issy Long 7dcd5e2be6 publish-commit-bottles: Don't comment if it's a @BrewTestBot auto-merge
- This was annoying me, and it must have been weird to contributors too,
  to have a bot reference itself.
- Since PRs can still be merged with `brew pr-publish` _outside_ of
  the auto-merge process, ie if things are particularly urgent, I've
  kept this in for human maintainers who trigger the action.
- The "publish failed" message is still useful in all cases.

Closes #53798.

Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>
2020-04-26 19:05:29 +00:00
Mike McQuaid 45076510b3 workflows/tests: split test-bot invocations.
This should improve the GitHub Actions output.
2020-04-26 14:31:09 +01:00
Jonathan Chang f6a625fd44 workflows: set user name 2020-04-26 12:09:29 +10:00
Jonathan Chang 87c4c1137d workflows: fix committer for nameless users 2020-04-26 11:08:13 +10:00
Jonathan Chang b17640aba9 workflow: fix parens 2020-04-26 10:14:00 +10:00
Jonathan Chang 6b50c0228f workflows: remove "ready to merge" on publish fail 2020-04-26 10:13:26 +10:00
Jonathan Chang ad9251e048 workflows: enable autopublish 2020-04-26 10:09:17 +10:00
Dawid Dziurla f888779204
workflows: add autopublish workflow (#53194)
Only do a dry run, for now.
2020-04-25 16:28:24 +10:00
Mike McQuaid 17db3c9522 workflows/tests: output failures.
Provide a summary of what steps failed.
2020-04-22 13:56:56 +01:00
Dawid Dziurla 64b782f2cd
Revert "workflows: don't use Docker container"
This reverts commit 5d35fe1f38.

`line 1: brew: command not found`
2020-04-21 10:33:34 +02:00
Jonathan Chang 5d35fe1f38 workflows: don't use Docker container 2020-04-19 22:43:05 +10:00
Issy Long 052d729e64
publish-commit-bottles: Fix bug with error message syntax from #53098 (#53104)
- I tried to be too clever. Given that I don't know JS, that was a bad
  idea. Let's do this the less elegant but (hopefully) definitely
  working way to avoid cryptic errors like:

```
[error]Cookies must be enabled to use GitHub.
```

from [`pr-publish` Actions runs](https://github.com/Homebrew/homebrew-core/runs/583194836?check_suite_focus=true).
2020-04-13 18:09:24 +01:00
Issy Long cbc4461925
publish-commit-bottles: Improve linking in "merge triggered/failed" messages (#53098)
- It was probably not entirely clear to users what "bottle pull" meant.
- We can use Markdown style links to make the message shorter.
- Tested in a browser with `console.log()` as that's as far as my JS
  goes!
2020-04-13 17:33:27 +01:00
Mike McQuaid 06a8b116f1 workflows/tests: make consistent with Homebrew/brew.
Make more of the logic consistent with what Homebrew/brew's GitHub
Actions' configuration does.
2020-04-13 11:31:58 +01:00
Issy Long c1c9fe85bc
publish-commit-bottles: Comment on a PR when someone triggers the Action (#53002)
- I went to do my first `brew pr-publish` on a "ready to merge" PR and
  it failed, because @dawidd6 had already started.
- We can't expect maintainers to pick through the Actions UI to find
  existing Actions that are running for the formula - the UI isn't
  that good.
- So this adds a comment to the PR, when the Action starts, to say who
  started it. It serves as a warning to other maintainers that it's in
  hand and to not try. Unless it fails for some reason.
2020-04-12 11:41:20 +01:00
Jonathan Chang 36497e0c51 workflows: update name to reflect migration 2020-04-11 18:37:12 +10:00
Sean Molenaar bbd457a944 Workflow: Set GITHUB_TOKEN variable 2020-04-09 18:25:51 +10:00
Jonathan Chang f34ce2de48 workflows: post comment on pr-publish failure 2020-04-08 20:03:38 +01:00
Bo Anderson 26f20caec7 workflows/tests: update Homebrew before running 2020-04-04 16:01:25 +11:00
Bo Anderson c974d3d6af
workflows/tests: always upload bottles (#52431) 2020-04-02 10:09:45 +01:00
Dawid Dziurla 16722fb659
workflows: mount unzip from runner 2020-03-31 14:27:27 +02:00
Dawid Dziurla 087583d351
workflows: configure git for pull-pr 2020-03-31 14:26:41 +02:00
Dawid Dziurla 39cc29c9f7
workflows: verbose pull-pr 2020-03-31 13:52:28 +02:00
Dawid Dziurla e76a9e1153
workflows: install unzip
required by `brew pr-pull`
2020-03-31 13:42:11 +02:00
Dawid Dziurla bceaedeb7d
workflows: set HOMEBREW_GITHUB_API_TOKEN for pr-pull 2020-03-31 13:29:25 +02:00
Dawid Dziurla 1f14d3b40d
workflows: fix 2020-03-31 13:19:42 +02:00
Dawid Dziurla 14306c1a6a
workflows: use brew pr-pull (#52372) 2020-03-31 13:17:07 +02:00
Bo Anderson 24edab7e65
workflows/tests: don't fail fast (#52152) 2020-03-26 19:55:28 +11:00
Jonathan Chang 052a37f40d workflows: do full checkouts from the beginning 2020-03-22 21:03:57 +11:00
Jonathan Chang d323ccba87 workflows: fetch origin too 2020-03-22 20:58:03 +11:00
Jonathan Chang 9301a9e357 workflows: rebase against master 2020-03-22 20:55:24 +11:00
Jonathan Chang 205854f4db workflows: cd to correct repo 2020-03-22 20:44:45 +11:00
Jonathan Chang b32264669b workflows: also fetch master 2020-03-22 20:41:35 +11:00
Jonathan Chang aba0ab419f workflows: fetch HEAD commit 2020-03-22 20:36:52 +11:00
Jonathan Chang 1d74a0a1d9 workflows: fetch the pull request commit 2020-03-22 20:23:17 +11:00
Jonathan Chang ca2100f359 workflows: set timeout to 72 hours
This matches our current Jenkins configuration.
2020-03-22 15:15:34 +11:00
Jonathan Chang 2868560ecd workflows: fix git authentication
Populate the git checkout with BrewTestBot's personal access token
(in HOMEBREW_GITHUB_API_TOKEN), rather than github[bot]'s token. This
permits us to override the branch protection rule for our rebase
workflow.
2020-03-22 13:04:37 +11:00
Jonathan Chang 724fabcaaf workflows: remove testing lines 2020-03-22 02:56:38 +11:00
Jonathan Chang a9b5c45281 workflows: use literal newline 2020-03-22 02:49:12 +11:00
Jonathan Chang a84733a820 workflows: amend with close message and signoff 2020-03-22 02:31:09 +11:00
Jonathan Chang 7ce5cba08d workflows: rebase against origin/master
We're pushing to master so of course a rebase against master would
result in a no-op.
2020-03-22 01:55:18 +11:00
Jonathan Chang cd5943e51a workflows: use correct email 2020-03-22 01:45:52 +11:00
Jonathan Chang 34e5c38b16 workflows: don't rely on JSON returns 2020-03-22 01:42:24 +11:00
Jonathan Chang dcce4571e3 workflows: add debug information 2020-03-22 01:27:42 +11:00
Jonathan Chang 48dec09c4b workflow: temporarily tap test-bot repo 2020-03-22 00:10:38 +11:00
Jonathan Chang 66c20fbab8 workflows: checkout earlier in steps 2020-03-22 00:08:51 +11:00
Jonathan Chang 7f7942785a workflows: set up tap and test-bot changes 2020-03-22 00:05:56 +11:00
Jonathan Chang 1975b561eb workflows: fix commiter identification 2020-03-21 22:25:08 +11:00
Jonathan Chang 463c9984b2 workflows: emit more debugging information 2020-03-21 22:10:15 +11:00
Jonathan Chang 133951cad6 workflows: fix Bintray username 2020-03-21 19:58:37 +11:00
Jonathan Chang f2ac8550e3 workflows: clobber existing unpublished upload 2020-03-21 19:22:28 +11:00
Jonathan Chang 045f4a6231 workflows: cd from pwd 2020-03-21 19:07:57 +11:00
Jonathan Chang 1e890d98ce workflows: don't commit (for now) 2020-03-21 18:08:31 +11:00
Jonathan Chang 0be4876b74
workflows: add dispatch event to commit bottles (#51936) 2020-03-21 02:27:58 +11:00
Jonathan Chang 2575b61bb6
workflows: update for brew test-bot changes (#50620) 2020-03-11 00:52:42 +11:00
Mike McQuaid 8d4fa10423 GitHub Actions CI tweaks
- rename to `tests.yml` and `tests` job to be consistent with
  Homebrew/brew
- eventually name `GitHub Actions CI` to be consistent with
  Homebrew/brew but (for now) be `New CI Testing (Ignore Failures)` to
  avoid contributors being confused by failures.
- run on all pull requests
2020-03-02 12:50:21 +00:00
Jonathan Chang d0a1667529
workflows: add self-hosted bottling workflow (#50468) 2020-02-24 03:21:37 +11:00
Issy Long 232f4e1fdd
[Actions] Revert addition of auto-labeller action for `bottle :unneeded` (#48929)
- I forgot that GitHub doesn't support secrets in Actions from forked repos, [until there was a legitimate use case for adding a label](https://github.com/Homebrew/homebrew-core/pull/48927), so the action will fail:

```
/opt/hostedtoolcache/Ruby/2.6.3/x64/lib/ruby/gems/2.6.0/gems/octokit-4.15.0/lib/octokit/response/raise_error.rb:16:in `on_complete': POST https://api.github.com/repos/Homebrew/homebrew-core/issues/48927/labels: 403 - Resource not accessible by integration // See: https://developer.github.com/v3/issues/labels/#add-labels-to-an-issue (Octokit::Forbidden)
```

- Given our PR workflow is "forked repo for everything", we can't do this until
  GitHub supports using secrets in forked PRs. It's a [requested
  feature](https://github.community/t5/GitHub-Actions/how-to-use-GITHUB-TOKEN-for-PRs-from-forks/td-p/37450).
- Maybe at some other point in the future, we can revisit this and other
  auto-labelling actions.
- I enjoyed making it nonetheless, and now I have "forked repos" to add to my
  testing for future Actions proof-of-concepts!

----

Reverts #48911 and supersedes #48919.
2020-01-12 17:41:47 +00:00
Issy Long db38f1e3e1
[Actions] Label PRs where the formula is `bottle :unneeded` (#48911)
- The vast majority of formulae here have bottles, but there are some
  that we can merge through the GitHub web UI buttons.
- Yes, we'll still check the diff of submitted formulae, but for those
  short on time, it might be good to know that we can review submissions
  and merge them on GitHub without having to be near a computer to pull
  the bottles.
- This was also a nice look into how we can potentially in future
  auto-label other conditions for formulae (new formula, test failure,
  etc).
2020-01-12 13:12:50 +00:00
Mike McQuaid 9068085dd2
generate_formulae.brew.sh_data: fetch/rebase when needed.
Similar change to https://github.com/Homebrew/brew/pull/6791.
2019-12-02 13:22:51 +00:00
Cheng XU ecd943c2bd github action: only run in the main repo
This prevents the action being run in the fork, which
will generate errors due to missing token.
2019-10-02 23:36:37 +02:00
Eric Knibbe ab8015a4d8 Migrate data generation workflow to YAML (#44203) 2019-09-13 09:33:39 +01:00