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

Gh actions #39

Merged
merged 26 commits into from
Sep 22, 2022
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
1 change: 0 additions & 1 deletion .coveralls.yml

This file was deleted.

53 changes: 53 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Ruby specs
on: [push, pull_request]
jobs:
test:
name: tests
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
ruby: ['2.5', '2.7', '3.0', '3.1', head, truffleruby, truffleruby-head]
runs-on: ${{ matrix.os }}
continue-on-error: true
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- name: Get the newest rubygems version to rid ourselves of warnings
run: gem update --system --no-document

- name: Install bundler
run: gem i bundler --no-document

- name: Install dependencies
run: |
bundle config set --local without benchmark
bundle install --jobs=3

- name: RSpec testing
run: |
JRUBY_OPTS="--dev --debug" bundle exec rspec --color --format documentation

- name: Coveralls Parallel
uses: coverallsapp/github-action@1.1.3
with:
github-token: ${{ secrets.github_token }}
flag-name: run-${{ matrix.ruby-version }}
path-to-lcov: ${{ github.workspace }}/coverage/lcov.info
parallel: true

coverage:
name: Coverage
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@1.1.3
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: ${{ github.workspace }}/coverage/lcov.info
parallel-finished: true
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions .undercover
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-l coverage/lcov.info
7 changes: 6 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,10 @@ gemspec
group :development do
gem 'guard-rspec', require: false
gem 'guard-rubocop'
gem 'coveralls', require: false
gem 'undercover'
end

group :test do
gem 'simplecov'
gem 'simplecov-lcov'
end
19 changes: 17 additions & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,23 @@
$LOAD_PATH.unshift(File.dirname(__FILE__))

require 'vscale/api'
require 'coveralls'
Coveralls.wear!
require 'simplecov'
require 'simplecov-lcov'

SimpleCov.minimum_coverage line: 90

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

SimpleCov.formatter = SimpleCov::Formatter::LcovFormatter
SimpleCov.start do
add_filter(/^\/test\//) # For Minitest
enable_coverage(:branch) # Report branch coverage to trigger branch-level undercover warnings
end

require 'undercover'

RSpec.configure do |config|
config.expect_with :rspec do |c|
Expand Down