Skip to content

Commit 72e16ad

Browse files
authored
Merge pull request #190 from paviliondev/update_simplecov
Move to new coverage approach
2 parents f9b35a2 + 684a2a3 commit 72e16ad

File tree

80 files changed

+52
-113
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+52
-113
lines changed

.github/workflows/plugin-tests.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,13 @@ jobs:
141141
142142
- name: Plugin RSpec with Coverage
143143
if: matrix.build_type == 'backend' && steps.check_spec.outputs.files_exists == 'true'
144-
run: SIMPLECOV=1 bin/rake plugin:spec[${{ steps.repo-name.outputs.value }}]
144+
run: |
145+
if [ -e plugins/${{ steps.repo-name.outputs.value }}/.simplecov ]
146+
then
147+
cp plugins/${{ steps.repo-name.outputs.value }}/.simplecov .simplecov
148+
export COVERAGE=1
149+
fi
150+
bin/rake plugin:spec[${{ steps.repo-name.outputs.value }}]
145151
146152
- name: Plugin QUnit
147153
if: matrix.build_type == 'frontend' && steps.check_qunit.outputs.files_exists == 'true'

.simplecov

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# frozen_string_literal: true
2+
plugin = "discourse-custom-wizard"
3+
4+
SimpleCov.configure do
5+
track_files "plugins/#{plugin}/**/*.rb"
6+
add_filter { |src| !(src.filename =~ /(\/#{plugin}\/app\/|\/#{plugin}\/lib\/)/) }
7+
end
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)