-
Notifications
You must be signed in to change notification settings - Fork 322
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Use GitHub Actions for CI * Update Coveralls integration: generate lcov report with SimpleCov and send it after the test suite using coveralls GitHub Actions plugin * Update and cleanup RSpec config * Cleanup Rakefile * Remove active_model dependency (certificate_authority was fixed) PS: GH Actions syntax is ugly. Should we switch to Cirlce CI or GitLab CI? XD Resolves: #633
- Loading branch information
Showing
10 changed files
with
155 additions
and
88 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
ruby: [ ruby-2.4, ruby-2.5, ruby-2.6, ruby-2.7, jruby-9.2.11 ] | ||
os: [ ubuntu-latest, macos-latest, windows-latest ] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
|
||
- uses: actions/cache@v1 | ||
with: | ||
path: vendor/bundle | ||
key: bundle-use-ruby-${{ matrix.os }}-${{ matrix.ruby }}-${{ hashFiles('**/Gemfile.lock') }} | ||
restore-keys: bundle-use-ruby-${{ matrix.os }}-${{ matrix.ruby }}- | ||
|
||
- name: bundle install | ||
run: | | ||
bundle config set path "vendor/bundle" | ||
bundle config set without "development" | ||
bundle install --jobs 4 | ||
- run: bundle exec rspec --format progress --force-colour | ||
|
||
- name: Prepare Coveralls test coverage report | ||
uses: coverallsapp/[email protected] | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
flag-name: "${{ matrix.ruby }} @${{ matrix.os }}" | ||
path-to-lcov: ./coverage/lcov/lcov.info | ||
parallel: true | ||
|
||
coveralls: | ||
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Finalize Coveralls test coverage report | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
parallel-finished: true | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.4 | ||
|
||
- uses: actions/cache@v1 | ||
with: | ||
path: vendor/bundle | ||
key: bundle-use-ruby-lint-${{ hashFiles('**/Gemfile.lock') }} | ||
restore-keys: bundle-use-ruby-lint- | ||
|
||
- name: bundle install | ||
run: | | ||
bundle config set path "vendor/bundle" | ||
bundle config set without "development" | ||
bundle install --jobs 4 | ||
- run: bundle exec rubocop --color | ||
- run: bundle exec rake verify_measurements |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,15 @@ | ||
*.gem | ||
.bundle | ||
.config | ||
.rvmrc | ||
.ruby-version | ||
.yardoc | ||
Gemfile.lock | ||
InstalledFiles | ||
_yardoc | ||
coverage | ||
|
||
.bundle | ||
.ruby-version | ||
doc | ||
lib/bundler/man | ||
measurement | ||
coverage | ||
pkg | ||
rdoc | ||
spec/reports | ||
test/tmp | ||
test/version_tmp | ||
spec/examples.txt | ||
tmp | ||
Gemfile.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1 @@ | ||
--backtrace | ||
--color | ||
--format=documentation | ||
--order random | ||
--require spec_helper |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# frozen_string_literal: true | ||
|
||
require "fuubar" | ||
|
||
RSpec.configure do |config| | ||
# Use Fuubar instafail-alike formatter, unless a formatter has already been | ||
# configured (e.g. via a command-line flag). | ||
config.default_formatter = "Fuubar" | ||
|
||
# Disable auto-refresh of the fuubar progress bar to avoid surprises during | ||
# debugiing. And simply because there's next to absolutely no point in having | ||
# this turned on. | ||
# | ||
# > By default fuubar will automatically refresh the bar (and therefore | ||
# > the ETA) every second. Unfortunately this doesn't play well with things | ||
# > like debuggers. When you're debugging, having a bar show up every second | ||
# > is undesireable. | ||
# | ||
# See: https://github.com/thekompanee/fuubar#disabling-auto-refresh | ||
config.fuubar_auto_refresh = false | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# frozen_string_literal: true | ||
|
||
require "simplecov" | ||
|
||
if ENV["CI"] | ||
require "simplecov-lcov" | ||
|
||
SimpleCov::Formatter::LcovFormatter.config do |config| | ||
config.report_with_single_file = true | ||
config.lcov_file_name = "lcov.info" | ||
end | ||
|
||
SimpleCov.formatter = SimpleCov::Formatter::LcovFormatter | ||
end | ||
|
||
SimpleCov.start do | ||
add_filter "/spec/" | ||
minimum_coverage 80 | ||
end |