Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track code coverage with SimpleCov #31

Merged
merged 1 commit into from
Jul 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,10 @@ jobs:
bundler-cache: true
- name: Run the default task
run: bundle exec rake
- name: Coveralls
uses: coverallsapp/github-action@v2
- name: Upload coverage report
uses: actions/upload-artifact@v3
with:
name: SimpleCov Coverage
path: coverage/
10 changes: 10 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ GEM
xpath (~> 3.2)
concurrent-ruby (1.2.2)
diff-lcs (1.5.0)
docile (1.4.0)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
json (2.6.3)
Expand Down Expand Up @@ -95,6 +96,13 @@ GEM
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov-lcov (0.8.0)
simplecov_json_formatter (0.1.4)
sinatra (3.0.6)
mustermann (~> 3.0)
rack (~> 2.2, >= 2.2.4)
Expand Down Expand Up @@ -130,6 +138,8 @@ DEPENDENCIES
rake (~> 13.0)
rspec (~> 3.0)
selenium-webdriver (~> 4.10)
simplecov (~> 0.22)
simplecov-lcov (~> 0.8)
sinatra (~> 3.0)
standard (~> 1.3)

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# PageEz

[![Coverage Status](https://coveralls.io/repos/github/joshuaclayton/page_ez/badge.svg?branch=main)](https://coveralls.io/github/joshuaclayton/page_ez?branch=main)

PageEz is a tool to define page objects with [Capybara].

[Capybara]: https://github.com/teamcapybara/capybara
Expand Down
2 changes: 2 additions & 0 deletions page_ez.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,6 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "selenium-webdriver", "~> 4.10"
spec.add_development_dependency "puma", "~> 6.3"
spec.add_development_dependency "launchy", "~> 2.5"
spec.add_development_dependency "simplecov", "~> 0.22"
spec.add_development_dependency "simplecov-lcov", "~> 0.8"
end
14 changes: 14 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# frozen_string_literal: true

require "simplecov"
require "simplecov-lcov"

SimpleCov::Formatter::LcovFormatter.config do |c|
c.report_with_single_file = true
c.single_report_path = "coverage/lcov.info"
end

SimpleCov.start do
add_filter "spec/"

formatter SimpleCov::Formatter::LcovFormatter
end

require "page_ez"
require "sinatra/base"
require "capybara/rspec"
Expand Down