Skip to content

Commit

Permalink
Setup Coveralls.io as Github Action
Browse files Browse the repository at this point in the history
  • Loading branch information
davidwessman authored and stanhu committed Feb 9, 2022
1 parent 22cc1b0 commit 4ba473a
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 11 deletions.
19 changes: 18 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
types: [opened, synchronize, reopened]

jobs:
base:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -30,6 +30,23 @@ jobs:
- name: Run tests
run: bundle exec rake

- name: Coveralls Parallel
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
flag-name: ruby-${{ matrix.ruby }}
parallel: true

finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true

rubocop:
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Originally was [omniauth-openid-connect](https://github.com/jjbohn/omniauth-open
I've forked this repository and launch as separate gem because maintaining of original was dropped.

[![Build Status](https://github.com/omniauth/omniauth_openid_connect/actions/workflows/main.yml/badge.svg)](https://github.com/omniauth/omniauth_openid_connect/actions/workflows/main.yml)
[![Coverage Status](https://coveralls.io/repos/github/omniauth/omniauth_openid_connect/badge.svg)](https://coveralls.io/github/omniauth/omniauth_openid_connect)

## Installation

Expand Down
4 changes: 2 additions & 2 deletions omniauth_openid_connect.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ Gem::Specification.new do |spec|
spec.add_dependency 'addressable', '~> 2.5'
spec.add_dependency 'omniauth', '>= 1.9', '< 3'
spec.add_dependency 'openid_connect', '~> 1.1'
spec.add_development_dependency 'coveralls', '~> 0.8'
spec.add_development_dependency 'faker', '~> 2.0'
spec.add_development_dependency 'guard', '~> 2.14'
spec.add_development_dependency 'guard-bundler', '~> 2.2'
Expand All @@ -39,5 +38,6 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'mocha', '~> 1.7'
spec.add_development_dependency 'rake', '~> 12.0'
spec.add_development_dependency 'rubocop', '~> 1.12'
spec.add_development_dependency 'simplecov', '~> 0.12'
spec.add_development_dependency 'simplecov', '~> 0.21'
spec.add_development_dependency 'simplecov-lcov', '~> 0.8'
end
24 changes: 16 additions & 8 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
# frozen_string_literal: true

lib = File.expand_path('../lib', __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)

require 'simplecov'
require 'coveralls'
require 'minitest/autorun'
require 'mocha/minitest'
require 'faker'
require 'active_support'

SimpleCov.start do
if ENV['CI']
require 'simplecov-lcov'

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

formatter SimpleCov::Formatter::LcovFormatter
end
end

lib = File.expand_path('../lib', __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'omniauth_openid_connect'
require_relative 'strategy_test_case'

SimpleCov.command_name 'test'
SimpleCov.start
Coveralls.wear!
OmniAuth.config.test_mode = true

0 comments on commit 4ba473a

Please sign in to comment.