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

Switch to GH Actions for CI and add coverage reporting #51

Merged
merged 1 commit into from Oct 26, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,32 @@
name: CI

on: [push, pull_request]

jobs:
build:
name: Build
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
ruby: ["3.0", "3.1", "3.2"]

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- name: Rake
run: bundle exec rake

- name: Archive SimpleCov Report
uses: actions/upload-artifact@v3
with:
name: coverage
path: coverage
11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

4 changes: 4 additions & 0 deletions Gemfile
Expand Up @@ -11,3 +11,7 @@ group :development do
# TODO: Move to gemspec when hanami-view 2.0 is available
gem 'hanami-view', github: 'hanami/view', tag: 'v2.1.0.beta2'
end

group :test do
gem 'simplecov', require: false
end
7 changes: 6 additions & 1 deletion Rakefile
Expand Up @@ -2,7 +2,12 @@

require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
require 'rubocop/rake_task'

RSpec::Core::RakeTask.new(:spec)
RuboCop::RakeTask.new

task default: :spec
desc 'Run code quality checks'
task lint: %i[rubocop]

task default: %i[lint spec]
9 changes: 9 additions & 0 deletions spec/spec_helper.rb
Expand Up @@ -2,6 +2,15 @@

require 'web_pipe'
require 'pry-byebug'
require 'simplecov'

unless ENV['NO_COVERAGE']
SimpleCov.start do
add_filter %r{^/spec/}
enable_coverage :branch
enable_coverage_for_eval
end
end

# https://github.com/dry-rb/dry-configurable/issues/70
WebPipe.load_extensions(
Expand Down