Skip to content

Commit d4614d1

Browse files
committed
Run specs in CI with/without the engine
1 parent 8df8ff5 commit d4614d1

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,16 @@ jobs:
2828
- "3.0"
2929
- "2.7"
3030
- "2.6"
31+
dummy:
32+
- "with-engine"
33+
- "without-engine"
3134
include:
3235
- ruby: "3.0"
3336
coverage: "true"
3437
env:
3538
COVERAGE: ${{matrix.coverage}}
3639
COVERAGE_TOKEN: ${{secrets.CODACY_PROJECT_TOKEN}}
40+
TEST_DUMMY: ${{matrix.dummy}}
3741
steps:
3842
- name: Checkout
3943
uses: actions/checkout@v1

spec/spec_helper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
ENV["RAILS_ENV"] ||= "test"
1616

1717
RAILS_VERSION = ENV["RAILS_VERSION"] || "6.x"
18-
WITH_ENGINE = (ENV["WITH_ENGINE"] || "true") == "true"
19-
DUMMY_DIR = WITH_ENGINE ? "with-engine" : "without-engine"
18+
DUMMY_DIR = ENV["TEST_DUMMY"] || 'with-engine'
19+
WITH_ENGINE = DUMMY_DIR == 'with-engine'
2020
require SPEC_ROOT.join("dummies/#{DUMMY_DIR}/dummy-#{RAILS_VERSION}/dummy/config/environment").to_s
2121

2222
require "rspec/rails"

0 commit comments

Comments
 (0)