diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bd5307b37..1a9ca8d13 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -91,8 +91,10 @@ jobs: bundle exec rake geoportal:ci --trace - name: Artifacts - Upload coverage - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 if: always() with: name: coverage - path: coverage/ + path: | + coverage/ + tmp/screenshots/ diff --git a/.gitignore b/.gitignore index 17ed63a4f..edadf6704 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,7 @@ /tmp jettywrapper.log *.log +coverage # Sitemap is generated periodically public/sitemap.xml* diff --git a/Gemfile b/Gemfile index c0ed81e90..c6b3f53fe 100644 --- a/Gemfile +++ b/Gemfile @@ -147,6 +147,7 @@ group :test do gem 'minitest' gem 'minitest-ci', '~> 3.4.0' gem 'minitest-reporters' + gem 'simplecov', require: false end gem 'net-ftp' diff --git a/Gemfile.lock b/Gemfile.lock index a05bd25ac..93f4ac296 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -297,6 +297,7 @@ GEM actionmailer (>= 5.0) devise (>= 4.6) diff-lcs (1.5.1) + docile (1.4.1) domain_name (0.6.20240107) dot-properties (0.1.4) bundler (>= 2.2.33) @@ -728,6 +729,12 @@ GEM simple_form (5.3.1) actionpack (>= 5.2) activemodel (>= 5.2) + simplecov (0.22.0) + docile (~> 1.1) + simplecov-html (~> 0.11) + simplecov_json_formatter (~> 0.1) + simplecov-html (0.12.3) + simplecov_json_formatter (0.1.4) sitemap_generator (6.0.2) builder (~> 3.0) slop (4.10.1) @@ -899,6 +906,7 @@ DEPENDENCIES selenium-webdriver sidekiq (~> 6.4) sidekiq-failures (~> 1.0.0) + simplecov sitemap_generator (~> 6.0.2) solr_wrapper! spring diff --git a/test/application_system_test_case.rb b/test/application_system_test_case.rb index 03fd32976..0ac9ecb19 100644 --- a/test/application_system_test_case.rb +++ b/test/application_system_test_case.rb @@ -6,7 +6,7 @@ [ "headless", - "window-size=1280x1280", + "window-size=1920,1080", "disable-gpu" # https://developers.google.com/web/updates/2017/04/headless-chrome ].each { |arg| options.add_argument(arg) } diff --git a/test/test_helper.rb b/test/test_helper.rb index 18d95c67f..7d373eb97 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,4 +1,14 @@ +# Configure Rails Environment ENV['RAILS_ENV'] ||= 'test' + +# SimpleCov +require "simplecov" +SimpleCov.formatter = SimpleCov::Formatter::HTMLFormatter + +SimpleCov.start "rails" do + add_filter ".internal_test_app/" +end + require File.expand_path('../../config/environment', __FILE__) require 'rails/test_help'