Skip to content
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
18 changes: 13 additions & 5 deletions .github/workflows/specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ name: Specs

on:
push:
branches: [develop, main]
branches: [main]
pull_request:
branches: [develop, main]
branches: [main]

jobs:
test:
tests:
runs-on: ubuntu-latest

strategy:
matrix:
ruby: ['2.6', '2.7', '3.0']

steps:
- name: Checkout
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Ruby
Expand All @@ -26,4 +26,12 @@ jobs:
bundler-cache: true

- name: Run tests
run: bin/rspec --profile
run: bundle exec rspec --profile

- name: Code Climate test coverage
uses: paambaati/codeclimate-action@v3.0.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageLocations: |
${{github.workspace}}/coverage/lcov/prawn-html.lcov:lcov
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ source 'https://rubygems.org'
gemspec

group :development, :test do
# Testing
gem 'pdf-inspector', require: 'pdf/inspector'
gem 'rspec'
gem 'simplecov', require: false
gem 'simplecov-lcov', require: false

# Linters
gem 'fasterer'
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Prawn HTML
[![gem version](https://badge.fury.io/rb/prawn-html.svg)](https://rubygems.org/gems/prawn-html)
[![gem downloads](https://badgen.net/rubygems/dt/prawn-html)](https://rubygems.org/gems/prawn-html)
[![maintainability](https://api.codeclimate.com/v1/badges/db674db00817d56ca1e9/maintainability)](https://codeclimate.com/github/blocknotes/prawn-html/maintainability)
[![linters](https://github.com/blocknotes/prawn-html/actions/workflows/linters.yml/badge.svg)](https://github.com/blocknotes/prawn-html/actions/workflows/linters.yml)
[![specs](https://github.com/blocknotes/prawn-html/actions/workflows/specs.yml/badge.svg)](https://github.com/blocknotes/prawn-html/actions/workflows/specs.yml)

Expand Down
8 changes: 8 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# 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 = ENV['LCOV_PATH'] if ENV['LCOV_PATH'].present?
end
simplecov_formatters = [SimpleCov::Formatter::LcovFormatter, SimpleCov.formatter]
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(simplecov_formatters)
SimpleCov.start do
add_filter '/spec/'
end
Expand Down