-
Notifications
You must be signed in to change notification settings - Fork 0
Scaffold out gem infra stuff #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
3789741
e6a99b8
3a05a85
4467952
ba516f9
d499ee5
8f574ee
d6edf52
a347313
de84dec
ab0c68a
478781f
e37429a
2bea198
5d06a95
83ade7c
9bd8502
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| ci: | ||
| runs-on: ubuntu-latest | ||
| name: CI checks | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| - name: Set up Ruby | ||
| uses: ruby/setup-ruby@09a7688d3b55cf0e976497ff046b70949eeaccfd # v1.288.0 | ||
| with: | ||
| bundler-cache: true | ||
| rubygems: 4.0.4 | ||
| - name: Run type check | ||
| run: bundle exec rake typecheck | ||
| - name: Run type check with Prism parser | ||
| run: bundle exec rake typecheck_prism | ||
| continue-on-error: true | ||
| - name: Run tests | ||
| run: bundle exec rake test | ||
| continue-on-error: true | ||
| - name: Lint Ruby files | ||
| run: bundle exec rake rubocop | ||
| - name: Verify gem RBIs are up-to-date | ||
| run: bin/tapioca gem --verify | ||
| - name: Verify duplicates in shims | ||
| run: bin/tapioca check-shims | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,13 @@ | ||
| inherit_gem: | ||
| rubocop-shopify: rubocop.yml | ||
|
|
||
| plugins: | ||
| - rubocop-minitest | ||
| - rubocop-rake | ||
|
|
||
| AllCops: | ||
| TargetRubyVersion: 3.2 | ||
| NewCops: enable | ||
|
|
||
| Style/StringLiterals: | ||
| EnforcedStyle: double_quotes | ||
|
|
||
| Style/StringLiteralsInInterpolation: | ||
| EnforcedStyle: double_quotes | ||
| Style/Semicolon: | ||
| AllowAsExpressionSeparator: true |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,36 @@ | ||
| # frozen_string_literal: true | ||
|
|
||
| require "bundler/gem_tasks" | ||
|
|
||
| desc "Type-check the code base with Sorbet" | ||
| task :typecheck do | ||
| sh "bundle exec srb tc" do |ok, _res| | ||
| abort unless ok | ||
| end | ||
| end | ||
|
|
||
| # Aliases for common names for this task. | ||
| desc "alias for typecheck"; task tc: :typecheck | ||
| desc "alias for typecheck"; task srb: :typecheck | ||
| desc "alias for typecheck"; task sorbet: :typecheck | ||
|
|
||
| desc "Type-check the code base with Sorbet using Prism" | ||
| task :typecheck_prism do | ||
| sh "bundle exec srb tc --parser=prism" do |ok, _res| | ||
| abort unless ok | ||
| end | ||
| end | ||
|
|
||
| require "minitest/test_task" | ||
|
|
||
| Minitest::TestTask.create | ||
| Minitest::TestTask.create do |t| | ||
| t.libs.delete("test") | ||
| t.libs << "spec" | ||
| t.test_globs = ["spec/**/*_spec.rb"] | ||
| end | ||
|
|
||
| require "rubocop/rake_task" | ||
|
|
||
| RuboCop::RakeTask.new | ||
|
|
||
| task default: %i[test rubocop] | ||
| task default: [:typecheck, :test, :rubocop] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| #!/usr/bin/env ruby | ||
| # frozen_string_literal: true | ||
|
|
||
| # | ||
| # This file was generated by Bundler. | ||
| # | ||
| # The application 'tapioca' is installed as part of a gem, and | ||
| # this file is here to facilitate running it. | ||
| # | ||
|
|
||
| ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) | ||
|
|
||
| require "rubygems" | ||
| require "bundler/setup" | ||
|
|
||
| load Gem.bin_path("tapioca", "tapioca") |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,7 @@ | ||
| # typed: strong | ||
| # frozen_string_literal: true | ||
|
|
||
| require_relative "type_toolkit/version" | ||
|
|
||
| module TypeToolkit | ||
| class Error < StandardError; end | ||
| # Your code goes here... | ||
| end |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| # typed: strong | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We advise against using |
||
| # frozen_string_literal: true | ||
|
|
||
| module TypeToolkit | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --dir | ||
| . | ||
| --ignore=tmp/ | ||
| --ignore=vendor/ | ||
| --enable-experimental-rbs-comments | ||
| --suppress-payload-superclass-redefinition-for=RDoc::Markup::Heading | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Weird EOF, was this generated by Tapioca? We may need to fix something.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No I think it was manual |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| **/*.rbi linguist-vendored=true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really want this to continue?