Skip to content

Commit

Permalink
Merge 2e5eb6a into eb6a2bc
Browse files Browse the repository at this point in the history
  • Loading branch information
rarruda committed Oct 1, 2021
2 parents eb6a2bc + 2e5eb6a commit a89e75d
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 18 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: CI

on:
push:
pull_request:

jobs:
test:

runs-on: ${{ matrix.os }}-latest

strategy:
matrix:
os:
- ubuntu
- macos
ruby-version:
- jruby
- 3.0
- 2.7
- 2.6
- 2.5

steps:
- uses: actions/checkout@v2
- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: ${{ matrix.ruby-version }}
- name: Install dependencies
run: bundle install
- name: Download test cases
run: git clone --depth 5 --branch v3.3.0 https://github.com/Unleash/client-specification.git client-specification
- name: Run tests
run: bundle exec rake
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Coveralls Parallel
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: run-${{ matrix.test_number }}
parallel: true
- name: Notify Slack of pipeline completion
uses: 8398a7/action-slack@v3
if: ${{ github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }}
with:
status: ${{ job.status }}
text: Built on ${{ matrix.os }} - Ruby ${{ matrix.ruby-version }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

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

15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

18 changes: 16 additions & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,22 @@

require 'webmock/rspec'

require 'coveralls'
Coveralls.wear!
require 'simplecov'
require 'simplecov-lcov'

SimpleCov::Formatter::LcovFormatter.config do |config|
#Coveralls is coverage by default/lcov.Send info results
config.report_with_single_file = true
config.single_report_path = 'coverage/lcov.info'
end

SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([
SimpleCov::Formatter::HTMLFormatter,
#Simple Cov in formatter::Formatter::Add Lcov Formatter
SimpleCov::Formatter::LcovFormatter
])

SimpleCov.start

WebMock.disable_net_connect!(allow_localhost: false)

Expand Down
3 changes: 2 additions & 1 deletion unleash-client.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "rspec-json_expectations", "~> 2.2"
spec.add_development_dependency "webmock", "~> 3.8"

spec.add_development_dependency "coveralls", "~> 0.8"
spec.add_development_dependency "simplecov", "~> 0.21.2"
spec.add_development_dependency "simplecov-lcov", "~> 0.8.0"
spec.add_development_dependency "rubocop", "~> 0.80"
end

0 comments on commit a89e75d

Please sign in to comment.