309 Commits

Author SHA1 Message Date
Douglas Eichelberger
9075cbae62 brew style --fix 2023-04-21 09:58:50 -07:00
Douglas Eichelberger
ac1e6ded9a git grep -l '# typed: false' | xargs gsed -i 's|# typed: false||g' 2023-04-21 09:57:47 -07:00
Douglas Eichelberger
b90897e280 Create git_repo attr 2023-04-15 19:35:13 -07:00
Douglas Eichelberger
1ffb77f821 cleanup 2023-04-15 19:35:13 -07:00
Douglas Eichelberger
8307255ce8 Update call sites 2023-04-15 19:35:13 -07:00
Douglas Eichelberger
429f23dcc6 Create GitRepoPath 2023-04-15 19:35:12 -07:00
Carlo Cabrera
5b8ead7bc8
Add more tests
Also, remove most integration tests, because they're slow.
2023-04-07 22:21:46 +08:00
Carlo Cabrera
87373ff12a
Move more code out of dev-cmd 2023-04-06 02:13:15 +08:00
Carlo Cabrera
5194e5c65e
Check for --eval-all before using HOMEBREW_EVAL_ALL 2023-04-05 00:03:58 +08:00
Carlo Cabrera
506f6c81a7
Support --dependents flag on macOS 2023-04-04 16:20:37 +08:00
Carlo Cabrera
c125079d0f
determine-test-runners: allow usage on macOS without --dependents 2023-04-04 13:54:35 +08:00
Carlo Cabrera
3d03d243a4
determine-test-runners: test failure modes (again) 2023-04-04 13:25:44 +08:00
Carlo Cabrera
e191dbfb9e
Improve style 2023-04-04 13:20:03 +08:00
Carlo Cabrera
7ff2382d74
determine-test-runners: fix parallel tests
Since these tests run in parallel, we want to minimise our reliance on
environment variables. Also, we need to make sure that different
examples write to different paths.
2023-04-04 12:16:54 +08:00
Carlo Cabrera
4cb50a38c7
Improve versioned macOS test 2023-04-04 02:42:14 +08:00
Carlo Cabrera
839b7d44cc
determine-test-runners: test failure modes 2023-04-04 02:30:13 +08:00
Carlo Cabrera
3d7d4c60f7
determine-test-runners_spec: hardcode fewer things 2023-04-04 02:13:35 +08:00
Carlo Cabrera
3dc66fae9f
determine-test-runners: add non-trivial tests 2023-04-04 01:46:33 +08:00
Carlo Cabrera
140e751ec6
Fix brew style 2023-04-04 01:12:05 +08:00
Carlo Cabrera
d5dc9ee5e0
determine-test-runners: test --dependents 2023-04-04 01:02:47 +08:00
Carlo Cabrera
4dc370ca24
Add some more tests 2023-04-04 00:45:54 +08:00
Carlo Cabrera
ae63b23472
determine-test-runners: add a test
I'll add more substantial tests shortly, but let's start with this one.
2023-04-03 22:42:00 +08:00
apainintheneck
2baaafba92 Cleanup irb history file in tests
This was caused by the irb spec. Note that
$HOME is set during the test setup so will
always be correct.
2023-03-09 17:07:08 -08:00
Issy Long
3a83b5492c
rubocop: Clean up Style/BlockDelimiters excludes and autofix offenses
- The defaults of using "do ... end" for multi-line blocks everywhere is
  good, better than switching everything to braces everywhere.
2023-03-08 23:54:22 +00:00
Issy Long
734a651f93
rubocop: Enable Layout/MultilineMethodCallIndentation & fix offenses
- Part of trying to reduce the number of `Excludes:` we have in our
  RuboCop configs.
- The fixes here all seemed reasonable, with some minimal tweaks for
  line length and less floatiness. Apart from `test/dev-cmd/bottle_spec.rb`
  where RuboCop wanted to do some ridiculously floaty indentation and there
  wasn't an obvious alternative place to break the lines, so I opted for
  in-line disables instead.
2023-03-03 22:18:51 +00:00
Mike McQuaid
8d02143c2b
Add generate-{cask,formula}-api commands
These replace the similar scripts in formulae.brew.sh.

Part of #14730.
2023-02-22 15:33:16 +00:00
Issy Long
298bb65dfb
rubocop: Entirely disable Metrics cops
- These are arbitrary length limits that had a load of disables in code.
- The limits were only increasing over time rather than decreasing.
- Fixing the problematic code to be shorter would take a long time for
  questionable gain since the problem has been around so long.
2023-02-21 00:34:17 +00:00
Issy Long
f8654bd363
rubocop: In-line disables of Metrics/{Module,Block,Class}Length
- We're not going to make the really long things be any shorter any time soon.
- The instructions in issue 14685 say, pragmatically, "disable all the rubocop
  rules we're never going to realistically fix e.g. Metrics/ClassLength". But
  that felt like a slippery slope to more _really_ long modules/classes/blocks,
  and the limits are here for a reason.
2023-02-19 16:33:23 +00:00
Mike McQuaid
a743e9277f
workflows/tests: faster, more reliable tests.
- Extract update tests into separate tests.
- Make `brew tests --online` run only once in its own job. This job
  could be made non-required to fight flakiness.
- Split up the various macOS runs into several steps now that we have
  more parallel macOS workers available.
- Cleanup some flaky tests.
2023-02-17 15:26:18 +00:00
Sanjito Kurniawan
2daae5e84d
edit: add HOMEBREW_NO_INSTALL_FROM_API warning. 2023-02-14 12:04:10 +00:00
Mike McQuaid
d1be288418
some needs_network specs: temporarily disable.
These are absurdly flaky right now so let's disable them.
2023-01-20 17:41:07 +00:00
Dawid Dziurla
0d0c98de29
Allow defining service run command per platform 2023-01-19 11:36:37 +01:00
Kevin
073c004ef3
Add :needs_network to brew prof tests
They need network access to download the profiler gems.

Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2023-01-02 10:02:51 -08:00
apainintheneck
d318c56013 Add integration tests for profiler 2022-12-30 19:37:32 -08:00
EricFromCanada
8f445de261
dev-cmd/create: also prompt for name with --cask 2022-12-06 13:04:51 -05:00
Mike McQuaid
59f4b5226a
tests: test on Ubuntu 18.04. 2022-11-09 14:45:43 +00:00
Bo Anderson
e7b47bc34e
test: sort metadata alphabetically 2022-11-05 16:51:33 +00:00
Bo Anderson
af234779af
test: support non-master init.defaultbranch 2022-10-07 18:44:03 +01:00
Bo Anderson
b6e3b146b2
test/dev-cmd/audit_spec: use eq instead of match 2022-09-07 20:36:09 +01:00
Mike McQuaid
af6165aab7
Automate sponsors updates
- Add sponsors updating to the existing man/completion/maintainer update workflow
- Hide/deprecated --fail-if-not-changed arguments and make them default behaviour
- Rename man-completions workflow to sponsors-maintainers-man-completions for consistency
- Make output and exit codes more consistent between these updating commands
- Fix maintainers updates not always being committed correctly
2022-09-02 08:24:33 +01:00
Issy Long
0355c60787
dev-cmd/contributions: Retrieve a user's repo contributions over time
- Before each AGM it's currently a manual process for a PLC member to
  search commit logs and GitHub to figure out who contributed to
  Homebrew, so who should remain a member.
- I noticed that [looking at commits for a
  user](https://github.com/Homebrew/homebrew-core/commits?author=issyl0&since=2022-01-01&until=2023-01-01)
  would not count `Co-Authored-By`, which happens a lot now there's an
  autosquash action on PRs in `Homebrew/homebrew-core`, say if someone
  fixed a formula's build or tests or whatever and then the PR got
  auto-merged.
- Here's `brew contributions` that uses `git log` to be able to go back
  through all time or a specific time period (`--from`, `--to`). It's up
  to individual PLC discretion for "activity", but it does at least go
  some way to automating the data retrieval.
- Example (I can use my username as `--email` because my username is in
  all of the email addresses that I use for committing to Homebrew):

```
$ brew contributions --email=issyl0 --repos=brew,core
Person issyl0 directly authored 732 commits and co-authored 31 commits to brew, core in all time.
```
2022-08-03 16:53:37 +01:00
Mike McQuaid
2d5eab2e1c
brew style --fix 2022-06-30 08:56:21 +01:00
Mike McQuaid
e381843215
Merge pull request #13201 from mhmdanas/remove-space-before-colon-in-livecheck-output
Remove space before colon in `livecheck` output
2022-04-27 14:52:30 +01:00
mhmdanas
37c46e1acd Remove space before colon in livecheck output 2022-04-27 01:09:16 +03:00
Sean Molenaar
9a25a1d5e1
pr-pull: add checksum update clause 2022-04-26 08:57:29 +02:00
Sean Molenaar
54e15cf361
pr-pull: allow pulling casks 2022-03-30 10:27:17 +02:00
Bo Anderson
e4159a7986
dev-cmd/pr-pull: consider alternative tap formula directories
Fixes #12939.
2022-03-01 16:39:09 +00:00
Issy Long
6b76fd012a
Fix (auto-correct) RuboCop RSpec/BeNil offenses 2022-03-01 00:10:10 +00:00
Rylan Polster
e5e4c288be
Cleanup brew style --fix suggestions 2022-02-11 10:45:51 -05:00
Josh Soref
37fd64b5a3 formula_auditor: new formulas should not define a revision
Logically new formulas should start at revision 0, but a
developer might use an existing formula as a template and
otherwise not realize they should remove this field.

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2022-02-09 13:14:10 -05:00