Skip to content

Commit

Permalink
Merge pull request #1 from sukechannnn/setup-ci-with-github-actions
Browse files Browse the repository at this point in the history
Setup GitHub Actions to execute test & lint
  • Loading branch information
sukechannnn authored Aug 5, 2021
2 parents 0c96925 + c70e33a commit c042b03
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 4 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: CI

on: [push, pull_request]

jobs:
ci:
strategy:
matrix:
os: [ubuntu, macos]
ruby: [3.0, 2.7, 2.6]
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Install dependencies
run: bundle install
- name: Run Rubocop
run: bundle exec rubocop
- name: Run tests
run: bundle exec rspec
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
/doc/
/pkg/
/spec/reports/
/tmp/
/tmp/*
!/tmp/.keep
*.gem

# rspec failure tracking
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require:
inherit_from: .rubocop_todo.yml

AllCops:
TargetRubyVersion: 3.1
TargetRubyVersion: 2.6

NewCops: enable
SuggestExtensions: false
Expand Down
5 changes: 3 additions & 2 deletions file_downloader.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
# spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
else
raise 'RubyGems 2.0 or newer is required to protect against ' \
'public gem pushes.'
'public gem pushes.'
end

# Specify which files should be added to the gem when it is released.
Expand All @@ -32,12 +32,13 @@ Gem::Specification.new do |spec|
spec.bindir = 'exe'
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ['lib']
spec.required_ruby_version = '>= 2.6'

spec.add_development_dependency 'bundler'
spec.add_development_dependency 'pry'
spec.add_development_dependency 'rake'
spec.add_development_dependency 'rspec'
spec.add_development_dependency 'rubocop'
spec.add_development_dependency 'rubocop-rspec'
spec.add_development_dependency 'webmock'
spec.add_development_dependency 'pry'
end
Empty file added tmp/.keep
Empty file.

0 comments on commit c042b03

Please sign in to comment.