Skip to content

Commit

Permalink
Fix CI - Update ci.yml by upgrading actions/upload-artifact (#611)
Browse files Browse the repository at this point in the history
* Update ci.yml

Upgrade actions/upload-artifact to latest

* SimpleCov

Add simplecov gem for test coverage reports.

* CI: artifacts should capture screenshots of failed tests too

* Update application_system_test_case.rb

Try wider window
  • Loading branch information
ewlarson authored Sep 23, 2024
1 parent f50a035 commit f5f4441
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 3 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
/tmp
jettywrapper.log
*.log
coverage

# Sitemap is generated periodically
public/sitemap.xml*
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
8 changes: 8 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -899,6 +906,7 @@ DEPENDENCIES
selenium-webdriver
sidekiq (~> 6.4)
sidekiq-failures (~> 1.0.0)
simplecov
sitemap_generator (~> 6.0.2)
solr_wrapper!
spring
Expand Down
2 changes: 1 addition & 1 deletion test/application_system_test_case.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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) }

Expand Down
10 changes: 10 additions & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
@@ -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'

Expand Down

0 comments on commit f5f4441

Please sign in to comment.