38 Commits

Author SHA1 Message Date
Sam Ford
2342dcd90c
Add comment to Gemfile about disallowed gems 2021-06-30 09:11:47 -04:00
Sam Ford
bb463376e8
Remove nokogiri from Gemfile 2021-06-30 09:11:46 -04:00
Alexander Bayandin
1595a908df
Merge pull request #11565 from bayandin/fuzzy-search-and-did-you-mean
Formula fuzzy search and did you mean
2021-06-23 18:27:10 +01:00
Alexander Bayandin
4c57b9d8f8
Gemfile: add did_you_mean gem 2021-06-22 18:06:53 +01:00
Jason Rudolph
e163eb8650
Enhance test suite to emit JUnit XML test reports
In preparation for detecting flaky tests with BuildPulse, this commit
sets up the rspec_junit_formatter gem to output JUnit XML reports of the
test suite, which is the format used by BuildPulse and various other
tooling that interprets test results.

Because the test suite uses the parallel_tests gem, this commit
incorporates some related changes to make all the parallel_tests gem and
the rspec_junit_formatter gem to cooperate with each other.

rspec_junit_formatter writes everything to a single XML file. That works
fine when there's only one process writing to the file. By default,
whatever process finishes last will write to the file and clobber the
output of all the other processes that wrote to the file. 🙈

To prevent this issue, the parallel_tests wiki recommends adding a
`.rspec_parallel` file to specify its RSpec options
(https://github.com/grosser/parallel_tests/wiki#with-rspec_junit_formatter----by-jgarber),
then the project can specify different files for each process to write
to like so:

  --format RspecJunitFormatter
  --out tmp/rspec<%= ENV['TEST_ENV_NUMBER'] %>.xml

However, prior to this commit, the Homebrew/brew test suite specified
its RSpec options via the command line. Unfortunately though, there's no
way (AFAICT) to set the equivalent of these options via the command
line:

  --format RspecJunitFormatter
  --out tmp/rspec<%= ENV['TEST_ENV_NUMBER'] %>.xml

So, we need to use a `.rspec_parallel` file to specify these options ☝️.

However, it appears that RSpec allows you to specify formatters _either_
in an options file (like `.rspec_parallel`) _or_ via command-line args.
But if you specify any formatters via command-line args, then all
formatters in the options file are ignored.  (I suspect that's somehow
related to this bit of code in rspec-core:
https://github.com/rspec/rspec-core/blob/v3.10.0/lib/rspec/core/configuration_options.rb#L64.)

With that in mind, in order to have the RspecJunitFormatter configured
 in `.rspec_parallel`, we need to move the other formatters into
 `.rpsec_parallel` as well, instead of passing them as command-line
 args. Therefore, this commit moves all the formatters into a
 `.rspec_parallel` file.
2021-06-21 13:14:18 -04:00
Bo Anderson
a06d136d2c
Move Sorbet gems into an optional group 2021-06-11 08:10:30 +01:00
Tom Hu
bba27eefec
Use double quotes 2021-04-01 20:29:27 -04:00
Tom Hu
0947ab6c29
Use simplecov-cobertura 2021-04-01 18:59:46 -04:00
Tom Hu
ff7c05a285
Merge branch 'master' into codecov-action 2021-03-21 14:58:03 -04:00
Bo Anderson
bb4e74042a
formula_assertions: use minitest
We are migrating away from using system gems, and we already have minitest in our dependency tree, so we might as well use it.
2021-02-26 18:23:07 +00:00
Rylan Polster
3595ac1f7f
style: call rubocop directly 2021-02-10 22:36:42 -05:00
Tom Hu
1fb58d5b2f Add Codecov GitHub Action step 2021-02-03 22:46:05 -05:00
Mike McQuaid
89fc131422
Gemfile: install bootsnap.
And allow type checking of `homebrew_bootsnap.rb`.
2021-02-02 12:34:15 +00:00
Mike McQuaid
683ae7ff53
Add HOMEBREW_BOOTSNAP to optionally use Bootsnap
> Bootsnap is a library that plugs into Ruby, with optional support
> for ActiveSupport and YAML, to optimize and cache expensive
> computations.
https://github.com/Shopify/bootsnap

For our case that translates to "repeated calls to `brew` have
reductions in the time spend `require`ing speeding up the process
boot time".

For example:

```
$ hyperfine --warmup=2 "unset HOMEBREW_BOOTSNAP; brew info wget" "export HOMEBREW_BOOTSNAP=1; brew info wget"
Benchmark #1: unset HOMEBREW_BOOTSNAP; brew info wget
  Time (mean ± σ):      2.417 s ±  0.032 s    [User: 659.0 ms, System: 855.5 ms]
  Range (min … max):    2.382 s …  2.464 s    10 runs

Benchmark #2: export HOMEBREW_BOOTSNAP=1; brew info wget
  Time (mean ± σ):      1.862 s ±  0.064 s    [User: 425.3 ms, System: 566.8 ms]
  Range (min … max):    1.736 s …  1.952 s    10 runs

Summary
  'export HOMEBREW_BOOTSNAP=1; brew info wget' ran
    1.30 ± 0.05 times faster than 'unset HOMEBREW_BOOTSNAP; brew info wget'
```
2021-01-21 12:34:04 +00:00
Seeker
332778025a utils/ast: add Sorbet method signatures 2021-01-07 13:54:05 -08:00
Issy Long
3c2467fc3d
Replace test/support/github_formatter with rspec-github gem
- This was a TODO in `test/support/github_formatter.rb` and the PR it
  referenced had been merged.
2020-12-22 18:03:01 +00:00
Markus Reiter
e3818ee51e Fix parsing version from PackageInfo files. 2020-12-14 15:29:32 +01:00
Mike McQuaid
8528eff604
Add and enable rubocop-rails.
This will help us catch and cleanup usage of e.g. `.blank?` and other
helpers we use from ActiveSupport.
2020-12-02 10:43:04 +00:00
Markus Reiter
ae8ebf9464 Add rspec-sorbet. 2020-11-19 16:14:22 +01:00
Markus Reiter
772a45e758 Vendor sorbet-runtime-stub. 2020-10-09 16:45:13 +02:00
Markus Reiter
f27d7a21d7 Vendor rubocop-sorbet. 2020-10-09 16:45:13 +02:00
Mike McQuaid
6f311852d6 Fix unvendored RubyGems
- Avoid caching RubyGems in GitHub Actions `tests.yml` to catch this in
  future.
- Run `brew doctor` in GitHub Actions `tests.yml` after installing
  RubyGems to catch this in future.
- Ignore relevant RubyGems (and fix outdated comments)
- Never auto-`require` RubyGems that aren't vendored.
- Update `bundler/setup.rb`.
2020-08-27 14:03:03 +01:00
Issy Long
25ce3875a4
Gemfile: Unpin sorbet version
- This was originally pinned in 1a6467eeeab8887ff404ff87b8b15d6c50c0525c
  because we found that later versions surfaced over 100 new typing errors
  in Tapioca's autogenerated RBI files. It seems like these are able to
  be fixed now.
2020-08-09 12:03:30 +01:00
vidusheeamoli
53ebef4c67 Gemfile: drop sorbet environment 2020-08-09 02:40:01 +05:30
Mike McQuaid
dff330e336
Merge pull request #8034 from rmNULL/pelf-gemlock
include  patchelf.rb and its deps in Gemfile.lock
2020-07-22 09:58:49 +01:00
vidusheeamoli
1a6467eeea Gemfile: set sorbet version 2020-07-21 23:45:34 +05:30
rmnull
ff66534242
add patchelf to Gemfile 2020-07-21 13:30:40 +05:30
Mike McQuaid
170b38892a
Use CodeCov for coverage reporting. 2020-07-02 10:22:54 +01:00
rmnull
486114282c
In ELFShim, #needed_libraries, #dynamic_elf? and #with_interpreter? check using patchelf gem.
Having HOMEBREW_PATCHELF_RB set in the ENV,
will conditionally install patchelf.rb gem,
use patchelf.rb in the above mentioned methods.
The installed vendored gems are listed in .gitignore
to maintain a clean state.
2020-06-19 21:23:57 +05:30
vidusheeamoli
73d2c98689 Gemfile: add tapioca gem 2020-06-14 02:01:10 +05:30
vidusheeamoli
5ef55d9637 homebrew-sorbet env 2020-06-11 16:46:05 +05:30
vidusheeamoli
536726799d Gemfile: add sorbet and sorbet-runtime
bundler/setup: add sorbet and sorbet-runtime
2020-06-11 11:41:53 +05:30
vidusheeamoli
4f1e9f44a1 set up byebug debugger 2020-05-18 16:28:43 +05:30
Mike McQuaid
a36f00ae8b
Ruby 2.6 (and remove backports) gems 2019-10-10 16:17:05 +01:00
Markus Reiter
b1d0c61fea Update Gems. 2019-10-03 09:22:44 +02:00
Mike McQuaid
738f4689a5
Add rubocop-performance gem. 2019-04-30 08:44:10 +01:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
Mike McQuaid
921d4aad77
Unify test/vendor Gemfiles and bundler configuration. 2019-02-21 16:34:19 +00:00