Skip to content

Commit a356b20

Browse files
committed
split up gems into dev/test
1 parent bbac31a commit a356b20

3 files changed

Lines changed: 26 additions & 33 deletions

File tree

.github/workflows/deploy-site.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ jobs:
4949

5050
- name: Install dependencies
5151
run: |
52-
bundle install
5352
cd site && yarn install
5453
5554
- name: Download coverage artifacts
@@ -63,6 +62,9 @@ jobs:
6362
- name: Generate YARD documentation
6463
run: |
6564
mkdir -p site/public/yard
65+
# Install development dependencies for YARD
66+
bundle config set --local with 'development'
67+
bundle install
6668
bundle exec yard doc --output-dir=site/public/yard
6769
6870
- name: Copy coverage to site

.github/workflows/test.yml

Lines changed: 12 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
run: |
2525
# Make sure bundler is using the correct Ruby version
2626
ruby -v
27-
bundle install
27+
# yarn dependencies for site
2828
yarn install
2929
cd site && yarn install && cd ..
3030
@@ -73,21 +73,16 @@ jobs:
7373
steps:
7474
- uses: actions/checkout@v4
7575

76+
# For bundler to work with different Ruby versions
77+
- name: Set CI environment variable
78+
run: echo "CI=true" >> $GITHUB_ENV
79+
7680
- name: Setup Ruby 3.0
7781
uses: ruby/setup-ruby@v1
7882
with:
7983
ruby-version: "3.0"
8084
bundler-cache: true
81-
82-
# For bundler to work with different Ruby versions
83-
- name: Set CI environment variable
84-
run: echo "CI=true" >> $GITHUB_ENV
85-
86-
- name: Install dependencies
87-
run: |
88-
ruby -v
89-
bundle config set --local without 'development'
90-
bundle install
85+
bundler-args: --without development
9186

9287
- name: Run tests
9388
run: bin/test
@@ -128,25 +123,17 @@ jobs:
128123
steps:
129124
- uses: actions/checkout@v4
130125

126+
# For bundler to work with different Ruby versions, we just need to set CI=true
127+
# This will make our conditional Gemfile logic skip the Ruby version requirement
128+
- name: Set CI environment variable
129+
run: echo "CI=true" >> $GITHUB_ENV
130+
131131
- name: Setup Ruby ${{ matrix.ruby }}
132132
uses: ruby/setup-ruby@v1
133133
with:
134134
ruby-version: ${{ matrix.ruby }}
135135
bundler-cache: true
136-
137-
# For bundler to work with different Ruby versions, we just need to set CI=true
138-
# This will make our conditional Gemfile logic skip the Ruby version requirement
139-
- name: Set CI environment variable
140-
run: echo "CI=true" >> $GITHUB_ENV
141-
142-
- name: Install dependencies
143-
run: |
144-
# Make sure bundler is using the correct Ruby version
145-
ruby -v
146-
# Configure bundler
147-
bundle config set --local without 'development'
148-
# Install dependencies with the specific Rails version
149-
bundle install
136+
bundler-args: --without development
150137

151138
- name: Run Ruby tests
152139
run: bin/test
@@ -182,7 +169,6 @@ jobs:
182169

183170
- name: Install dependencies
184171
run: |
185-
bundle install
186172
cd site && yarn install
187173
188174
- name: Export TypeScript types

Gemfile

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,23 +42,28 @@ gem "rollbar", "~> 3.4"
4242
gem "sentry-ruby", "~> 5.15"
4343
gem "shrine", "~> 3.5"
4444
gem "sidekiq", "~> 7.2"
45+
gem "sorbet"
4546

46-
group :development, :test do
47+
# Essential testing gems that don't have Ruby version restrictions
48+
group :test do
4749
gem "dalli"
48-
gem "debug"
49-
gem "amazing_print"
50-
gem "listen", require: false
5150
gem "minitest", "~> 5.20"
5251
gem "minitest-reporters", "~> 1.6"
5352
gem "simplecov", "~> 0.22", require: false
53+
gem "thor"
54+
end
55+
56+
# Development and linting tools that may have higher Ruby version requirements
57+
group :development do
58+
gem "debug"
59+
gem "amazing_print"
60+
gem "listen", require: false
5461
gem "rubocop-performance", require: false
5562
gem "rubocop-rails", require: false
5663
gem "rubocop-minitest", require: false
5764
gem "rubocop-sorbet", require: false
5865
gem "rubocop", require: false
5966
gem "solargraph", require: false
60-
gem "sorbet"
61-
gem "thor"
6267
gem "standard", ">= 1.35.1", require: false
6368
gem "tapioca", require: false
6469
gem "yard", "~> 0.9.36"

0 commit comments

Comments
 (0)