Add Codecov (#18580)
This commit is contained in:
parent
4ede05eee3
commit
9d77384586
3 changed files with 13 additions and 1 deletions
|
|
@ -42,6 +42,7 @@ env:
|
|||
- KNAPSACK_PRO_CI_NODE_TOTAL=3
|
||||
- COVERAGE_REPORTS_TOTAL=4
|
||||
- FOREM_OWNER_SECRET="secret" # test secret so e2e tests can run properly.
|
||||
- COVERAGE=true
|
||||
before_install:
|
||||
- sudo apt-get update
|
||||
- sudo apt-get -y install gsfonts
|
||||
|
|
@ -57,6 +58,11 @@ install:
|
|||
script:
|
||||
- bundle exec rails db:create db:schema:load webpacker:compile
|
||||
- bin/knapsack_pro_rspec
|
||||
after_script:
|
||||
- curl -Os https://uploader.codecov.io/latest/linux/codecov
|
||||
- chmod +x codecov
|
||||
- ls -l ./coverage
|
||||
- ./codecov
|
||||
notifications:
|
||||
slack:
|
||||
if: branch = main
|
||||
|
|
|
|||
|
|
@ -1,6 +1,13 @@
|
|||
ENV["RAILS_ENV"] = "test"
|
||||
require "knapsack_pro"
|
||||
require "simplecov"
|
||||
require "simplecov_json_formatter"
|
||||
|
||||
SimpleCov.formatter = SimpleCov::Formatter::JSONFormatter
|
||||
KnapsackPro::Adapters::RSpecAdapter.bind
|
||||
KnapsackPro::Hooks::Queue.before_queue do |_queue_id|
|
||||
SimpleCov.command_name("rspec_ci_node_#{KnapsackPro::Config::Env.ci_node_index}")
|
||||
end
|
||||
|
||||
require "spec_helper"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
require "dotenv/load"
|
||||
require "simplecov"
|
||||
require "active_support"
|
||||
require "active_support/testing/time_helpers"
|
||||
require "zonebie/rspec"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue