Skip to content

Commit dd7bc70

Browse files
authored
Merge pull request #528 from ruby/enabled-ci
Enabled GitHub Actions
2 parents 1093d04 + 7e2f8f4 commit dd7bc70

File tree

5 files changed

+95
-32
lines changed

5 files changed

+95
-32
lines changed

.github/workflows/ci.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Set up Ruby environment
15+
uses: ruby/setup-ruby@v1
16+
with:
17+
ruby-version: '3.4.4'
18+
bundler-cache: true
19+
20+
- name: Set up database
21+
env:
22+
RAILS_ENV: test
23+
run: |
24+
bundle exec rails db:create
25+
bundle exec rails db:schema:load
26+
27+
- name: Run tests
28+
env:
29+
RAILS_ENV: test
30+
run: bundle exec rake test

Gemfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,14 @@ gem "propshaft"
1010
gem "dartsass-rails"
1111
gem 'aws-sdk-s3', '~> 1'
1212

13-
group :development do
13+
group :development, :test do
1414
gem 'sqlite3'
1515
end
1616

1717
group :production do
1818
gem 'pg'
1919
end
20+
21+
group :test do
22+
gem 'test-unit'
23+
end

Gemfile.lock

Lines changed: 35 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ GEM
9191
aws-sigv4 (1.12.0)
9292
aws-eventstream (~> 1, >= 1.0.2)
9393
base64 (0.3.0)
94-
benchmark (0.4.0)
95-
bigdecimal (3.1.9)
94+
benchmark (0.4.1)
95+
bigdecimal (3.2.1)
9696
bootsnap (1.18.6)
9797
msgpack (~> 1.2)
9898
builder (3.3.0)
@@ -103,36 +103,36 @@ GEM
103103
railties (>= 6.0.0)
104104
sass-embedded (~> 1.63)
105105
date (3.4.1)
106-
drb (2.2.1)
106+
drb (2.2.3)
107107
erb (5.0.1)
108108
erubi (1.13.1)
109109
globalid (1.2.1)
110110
activesupport (>= 6.1)
111-
google-protobuf (4.31.0)
111+
google-protobuf (4.31.1)
112112
bigdecimal
113113
rake (>= 13)
114-
google-protobuf (4.31.0-aarch64-linux-gnu)
114+
google-protobuf (4.31.1-aarch64-linux-gnu)
115115
bigdecimal
116116
rake (>= 13)
117-
google-protobuf (4.31.0-aarch64-linux-musl)
117+
google-protobuf (4.31.1-aarch64-linux-musl)
118118
bigdecimal
119119
rake (>= 13)
120-
google-protobuf (4.31.0-arm64-darwin)
120+
google-protobuf (4.31.1-arm64-darwin)
121121
bigdecimal
122122
rake (>= 13)
123-
google-protobuf (4.31.0-x86-linux-gnu)
123+
google-protobuf (4.31.1-x86-linux-gnu)
124124
bigdecimal
125125
rake (>= 13)
126-
google-protobuf (4.31.0-x86-linux-musl)
126+
google-protobuf (4.31.1-x86-linux-musl)
127127
bigdecimal
128128
rake (>= 13)
129-
google-protobuf (4.31.0-x86_64-darwin)
129+
google-protobuf (4.31.1-x86_64-darwin)
130130
bigdecimal
131131
rake (>= 13)
132-
google-protobuf (4.31.0-x86_64-linux-gnu)
132+
google-protobuf (4.31.1-x86_64-linux-gnu)
133133
bigdecimal
134134
rake (>= 13)
135-
google-protobuf (4.31.0-x86_64-linux-musl)
135+
google-protobuf (4.31.1-x86_64-linux-musl)
136136
bigdecimal
137137
rake (>= 13)
138138
i18n (1.14.7)
@@ -191,6 +191,7 @@ GEM
191191
nokogiri (1.18.8-x86_64-linux-musl)
192192
racc (~> 1.4)
193193
pg (1.5.9)
194+
power_assert (2.0.5)
194195
pp (0.6.2)
195196
prettyprint
196197
prettyprint (0.2.0)
@@ -227,7 +228,7 @@ GEM
227228
activesupport (= 8.0.2)
228229
bundler (>= 1.15.0)
229230
railties (= 8.0.2)
230-
rails-dom-testing (2.2.0)
231+
rails-dom-testing (2.3.0)
231232
activesupport (>= 5.0.0)
232233
minitest
233234
nokogiri (>= 1.6)
@@ -242,42 +243,42 @@ GEM
242243
rake (>= 12.2)
243244
thor (~> 1.0, >= 1.2.2)
244245
zeitwerk (~> 2.6)
245-
rake (13.2.1)
246+
rake (13.3.0)
246247
rdoc (6.14.0)
247248
erb
248249
psych (>= 4.0.0)
249250
reline (0.6.1)
250251
io-console (~> 0.5)
251-
sass-embedded (1.89.0)
252+
sass-embedded (1.89.1)
252253
google-protobuf (~> 4.31)
253254
rake (>= 13)
254-
sass-embedded (1.89.0-aarch64-linux-android)
255+
sass-embedded (1.89.1-aarch64-linux-android)
255256
google-protobuf (~> 4.31)
256-
sass-embedded (1.89.0-aarch64-linux-gnu)
257+
sass-embedded (1.89.1-aarch64-linux-gnu)
257258
google-protobuf (~> 4.31)
258-
sass-embedded (1.89.0-aarch64-linux-musl)
259+
sass-embedded (1.89.1-aarch64-linux-musl)
259260
google-protobuf (~> 4.31)
260-
sass-embedded (1.89.0-arm-linux-androideabi)
261+
sass-embedded (1.89.1-arm-linux-androideabi)
261262
google-protobuf (~> 4.31)
262-
sass-embedded (1.89.0-arm-linux-gnueabihf)
263+
sass-embedded (1.89.1-arm-linux-gnueabihf)
263264
google-protobuf (~> 4.31)
264-
sass-embedded (1.89.0-arm-linux-musleabihf)
265+
sass-embedded (1.89.1-arm-linux-musleabihf)
265266
google-protobuf (~> 4.31)
266-
sass-embedded (1.89.0-arm64-darwin)
267+
sass-embedded (1.89.1-arm64-darwin)
267268
google-protobuf (~> 4.31)
268-
sass-embedded (1.89.0-riscv64-linux-android)
269+
sass-embedded (1.89.1-riscv64-linux-android)
269270
google-protobuf (~> 4.31)
270-
sass-embedded (1.89.0-riscv64-linux-gnu)
271+
sass-embedded (1.89.1-riscv64-linux-gnu)
271272
google-protobuf (~> 4.31)
272-
sass-embedded (1.89.0-riscv64-linux-musl)
273+
sass-embedded (1.89.1-riscv64-linux-musl)
273274
google-protobuf (~> 4.31)
274-
sass-embedded (1.89.0-x86_64-darwin)
275+
sass-embedded (1.89.1-x86_64-darwin)
275276
google-protobuf (~> 4.31)
276-
sass-embedded (1.89.0-x86_64-linux-android)
277+
sass-embedded (1.89.1-x86_64-linux-android)
277278
google-protobuf (~> 4.31)
278-
sass-embedded (1.89.0-x86_64-linux-gnu)
279+
sass-embedded (1.89.1-x86_64-linux-gnu)
279280
google-protobuf (~> 4.31)
280-
sass-embedded (1.89.0-x86_64-linux-musl)
281+
sass-embedded (1.89.1-x86_64-linux-musl)
281282
google-protobuf (~> 4.31)
282283
securerandom (0.4.1)
283284
sqlite3 (2.6.0)
@@ -293,17 +294,19 @@ GEM
293294
sqlite3 (2.6.0-x86_64-linux-gnu)
294295
sqlite3 (2.6.0-x86_64-linux-musl)
295296
stringio (3.1.7)
297+
test-unit (3.6.8)
298+
power_assert
296299
thor (1.3.2)
297300
timeout (0.4.3)
298301
tzinfo (2.0.6)
299302
concurrent-ruby (~> 1.0)
300303
uri (1.0.3)
301304
useragent (0.16.11)
302-
websocket-driver (0.7.7)
305+
websocket-driver (0.8.0)
303306
base64
304307
websocket-extensions (>= 0.1.0)
305308
websocket-extensions (0.1.5)
306-
zeitwerk (2.7.2)
309+
zeitwerk (2.7.3)
307310

308311
PLATFORMS
309312
aarch64-linux
@@ -339,6 +342,7 @@ DEPENDENCIES
339342
puma
340343
rails (~> 8.0)
341344
sqlite3
345+
test-unit
342346

343347
RUBY VERSION
344348
ruby 3.4.4p34

Rakefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,15 @@
55
require File.expand_path('../config/application', __FILE__)
66

77
Rubyci::Application.load_tasks
8+
9+
# Add chkbuild-ruby-info tests to the default test task
10+
namespace :test do
11+
desc "Run chkbuild-ruby-info tests"
12+
task :chkbuild_ruby_info do
13+
$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
14+
Dir.glob('test/chkbuild-ruby-info/test_*.rb').each { |f| require_relative f }
15+
end
16+
end
17+
18+
# Enhance the default test task to include chkbuild-ruby-info tests
19+
Rake::Task['test'].enhance(['test:chkbuild_ruby_info'])

test/test_helper.rb

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
ENV['RAILS_ENV'] ||= 'test'
2+
require_relative '../config/environment'
3+
require 'rails/test_help'
4+
5+
class ActiveSupport::TestCase
6+
# Run tests in parallel with specified workers
7+
parallelize(workers: :number_of_processors)
8+
9+
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
10+
fixtures :all
11+
12+
# Add more helper methods to be used by all tests here...
13+
end

0 commit comments

Comments
 (0)