Skip to content

Commit 5a26702

Browse files
committed
Add GitHub Action to replace Travis
Also, fix the build, as Appraisals did not reflect new version number and ActiveSupport integration tests were not set up properly.
1 parent 1b6417b commit 5a26702

22 files changed

+171
-131
lines changed

.github/workflows/super_diff.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: SuperDiff
2+
on: [push, pull_request]
3+
jobs:
4+
test:
5+
runs-on: ubuntu-20.04
6+
strategy:
7+
matrix:
8+
ruby:
9+
- 2.5
10+
- 2.6
11+
- 2.7
12+
gemfile:
13+
- gemfiles/rails_5_0.gemfile
14+
- gemfiles/rails_5_1.gemfile
15+
- gemfiles/rails_5_2.gemfile
16+
- gemfiles/rails_6_0.gemfile
17+
- gemfiles/no_rails.gemfile
18+
env:
19+
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
20+
JAVA_OPTS: "--add-opens java.base/sun.nio.ch=org.jruby.dist --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.security=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.security.cert=ALL-UNNAMED --add-opens=java.base/java.util.zip=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.util.regex=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/javax.crypto=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=java.base/java.io=org.jruby.dist"
21+
steps:
22+
- uses: actions/checkout@v2
23+
- name: Set up Ruby
24+
id: set-up-ruby
25+
uses: ruby/setup-ruby@v1
26+
with:
27+
ruby-version: ${{ matrix.ruby }}
28+
- uses: actions/cache@v2
29+
with:
30+
path: vendor/bundle
31+
key: v1-rubygems-local-${{ runner.os }}-${{ matrix.ruby }}-${{ hashFiles(format('{0}.lock', matrix.gemfile)) }}
32+
- name: Install dependencies
33+
run: bin/ci/install
34+
- name: Run tests
35+
run: bin/ci/run-tests

.travis.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

bin/ci/install

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
3+
bundle config set path $PWD/vendor/bundle
4+
bundle install --jobs=3 --retry=3
5+
6+
if ! which zeus &>/dev/null; then
7+
gem install zeus
8+
fi

bin/ci/run-tests

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
3+
bin/start-dev --background --debug
4+
bundle exec rake --trace

bin/start-dev

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ done
4343
if [[ -S .zeus.sock ]]; then
4444
error "It looks like Zeus is already running."
4545
echo "Try running 'pkill zeus' to stop it, then run this again."
46-
exit 1
46+
exit 2
4747
fi
4848

4949
if [[ $background -eq 1 ]]; then
@@ -69,7 +69,10 @@ if [[ $background -eq 1 ]]; then
6969
fi
7070
fi
7171

72-
exec zeus confirm_started
72+
if ! [[ -S .zeus.sock ]]; then
73+
echo "It looks like Zeus failed to run. Bummer."
74+
exit 3
75+
fi
7376
else
7477
if [[ $debug -eq 1 ]]; then
7578
exec zeus --log zeus.server.log start

config/zeus_plan.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@ class CustomZeusPlan < Zeus::Plan
1111
:@test_plan,
1212
:after_fork,
1313
:boot,
14+
:boot_active_support,
1415
:boot_active_record,
16+
:boot_rails,
1517
:run_plain_test,
18+
:run_rspec_active_support_test,
1619
:run_rspec_active_record_test,
1720
:run_rspec_rails_test,
18-
:confirm_started,
1921
)
2022

2123
def initialize(using_outside_of_zeus: false, color_enabled: false)

gemfiles/no_rails.gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: ..
33
specs:
4-
super_diff (0.5.2)
4+
super_diff (0.5.3)
55
attr_extras (>= 6.2.4)
66
diff-lcs
77
patience_diff

gemfiles/rails_5_0.gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: ..
33
specs:
4-
super_diff (0.5.2)
4+
super_diff (0.5.3)
55
attr_extras (>= 6.2.4)
66
diff-lcs
77
patience_diff

gemfiles/rails_5_1.gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: ..
33
specs:
4-
super_diff (0.5.2)
4+
super_diff (0.5.3)
55
attr_extras (>= 6.2.4)
66
diff-lcs
77
patience_diff

gemfiles/rails_5_2.gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: ..
33
specs:
4-
super_diff (0.5.2)
4+
super_diff (0.5.3)
55
attr_extras (>= 6.2.4)
66
diff-lcs
77
patience_diff

0 commit comments

Comments
 (0)