Skip to content

Commit 6044fa3

Browse files
committed
TEMP: Test code coverage fix
1 parent 8e87a70 commit 6044fa3

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/solidus_installer.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,14 @@ jobs:
4141
cd $RUNNER_TEMP/my_app
4242
bundle list | grep 'solidus_paypal_commerce_platform (1.'
4343
- name: Setup code coverage
44+
# SimpleCov must start before the app is loaded (Ruby's Coverage only
45+
# tracks files required after Coverage.start), so we load it from the top
46+
# of the generated spec_helper.rb rather than from spec/support, which is
47+
# required after rails_helper has already (eager-)loaded the app.
4448
run: |
45-
cp storefront/lib/testing_support/coverage.rb $RUNNER_TEMP/my_app/spec/support/solidus_storefront/coverage.rb
49+
cd $RUNNER_TEMP/my_app
50+
cp $GITHUB_WORKSPACE/storefront/lib/testing_support/coverage.rb spec/simplecov_setup.rb
51+
printf 'require_relative "simplecov_setup"\n%s\n' "$(cat spec/spec_helper.rb)" > spec/spec_helper.rb
4652
- name: Run starter frontend specs
4753
run: |
4854
cd $RUNNER_TEMP/my_app

0 commit comments

Comments
 (0)