Skip to content

Commit a1bed65

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

3 files changed

Lines changed: 36 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: 22 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,22 +73,22 @@ 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+
80+
# Configure bundler before setup-ruby runs
81+
- name: Configure bundler
82+
run: |
83+
mkdir -p ~/.bundle
84+
echo 'BUNDLE_WITHOUT: "development"' > ~/.bundle/config
85+
7686
- name: Setup Ruby 3.0
7787
uses: ruby/setup-ruby@v1
7888
with:
7989
ruby-version: "3.0"
8090
bundler-cache: true
8191

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
91-
9292
- name: Run tests
9393
run: bin/test
9494

@@ -128,25 +128,22 @@ jobs:
128128
steps:
129129
- uses: actions/checkout@v4
130130

131-
- name: Setup Ruby ${{ matrix.ruby }}
132-
uses: ruby/setup-ruby@v1
133-
with:
134-
ruby-version: ${{ matrix.ruby }}
135-
bundler-cache: true
136-
137131
# For bundler to work with different Ruby versions, we just need to set CI=true
138132
# This will make our conditional Gemfile logic skip the Ruby version requirement
139133
- name: Set CI environment variable
140134
run: echo "CI=true" >> $GITHUB_ENV
141-
142-
- name: Install dependencies
135+
136+
# Configure bundler before setup-ruby runs
137+
- name: Configure bundler
143138
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
139+
mkdir -p ~/.bundle
140+
echo 'BUNDLE_WITHOUT: "development"' > ~/.bundle/config
141+
142+
- name: Setup Ruby ${{ matrix.ruby }}
143+
uses: ruby/setup-ruby@v1
144+
with:
145+
ruby-version: ${{ matrix.ruby }}
146+
bundler-cache: true
150147

151148
- name: Run Ruby tests
152149
run: bin/test
@@ -182,7 +179,6 @@ jobs:
182179

183180
- name: Install dependencies
184181
run: |
185-
bundle install
186182
cd site && yarn install
187183
188184
- 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)