Skip to content

Commit

Permalink
CI: Replace Travis with GitHub Actions.
Browse files Browse the repository at this point in the history
Update gems to satisfy dependabot.
  • Loading branch information
gregschmit committed Jan 21, 2023
1 parent f5936a2 commit ccbe72c
Show file tree
Hide file tree
Showing 6 changed files with 163 additions and 96 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Pipeline
on: push
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Ruby and gems
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Run code checks
run: bundle exec rubocop
test:
needs: check
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: [2.6.8, 2.7.5, 3.0.4]
rails: [6.0.6, 6.1.4, 7.0.4]
exclude:
- ruby: 2.6.8
rails: 7.0.4
env:
RAILS_VERSION: ${{ matrix.rails }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Remove `Gemfile.lock` because this is a matrix job
run: rm Gemfile.lock
- name: Install Ruby and gems
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Execute migrations
run: bin/rails db:migrate
- name: Run tests
run: BACKTRACE=1 bin/rails test
- name: Check if coverage LCOV file exists
id: lcov_exists
uses: andstor/file-existence-action@v2
with:
files: coverage/lcov.info
- name: Submit coverage to `coveralls.io` if LCOV file exists
uses: coverallsapp/github-action@master
if: steps.lcov_exists.outputs.files_exists == 'true'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
release:
needs: test
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Ruby
uses: ruby/setup-ruby@v1
- name: Build the gem
run: gem build rest_framework.gemspec -o rest_framework.gem
- name: Push to RubyGems
env:
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
run: ls -lah

# gem push rest_framework.gem
File renamed without changes.
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ group :development do
end

group :test do
gem "coveralls_reborn", require: false
gem "minitest", ">= 5.0"
gem "simplecov"
gem "simplecov-lcov", "0.8.0", require: false
end

group :development, :test do
Expand Down
162 changes: 77 additions & 85 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,47 +7,47 @@ PATH
GEM
remote: https://rubygems.org/
specs:
actioncable (7.0.4)
actionpack (= 7.0.4)
activesupport (= 7.0.4)
actioncable (7.0.4.1)
actionpack (= 7.0.4.1)
activesupport (= 7.0.4.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (7.0.4)
actionpack (= 7.0.4)
activejob (= 7.0.4)
activerecord (= 7.0.4)
activestorage (= 7.0.4)
activesupport (= 7.0.4)
actionmailbox (7.0.4.1)
actionpack (= 7.0.4.1)
activejob (= 7.0.4.1)
activerecord (= 7.0.4.1)
activestorage (= 7.0.4.1)
activesupport (= 7.0.4.1)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.0.4)
actionpack (= 7.0.4)
actionview (= 7.0.4)
activejob (= 7.0.4)
activesupport (= 7.0.4)
actionmailer (7.0.4.1)
actionpack (= 7.0.4.1)
actionview (= 7.0.4.1)
activejob (= 7.0.4.1)
activesupport (= 7.0.4.1)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.0)
actionpack (7.0.4)
actionview (= 7.0.4)
activesupport (= 7.0.4)
actionpack (7.0.4.1)
actionview (= 7.0.4.1)
activesupport (= 7.0.4.1)
rack (~> 2.0, >= 2.2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (7.0.4)
actionpack (= 7.0.4)
activerecord (= 7.0.4)
activestorage (= 7.0.4)
activesupport (= 7.0.4)
actiontext (7.0.4.1)
actionpack (= 7.0.4.1)
activerecord (= 7.0.4.1)
activestorage (= 7.0.4.1)
activesupport (= 7.0.4.1)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.0.4)
activesupport (= 7.0.4)
actionview (7.0.4.1)
activesupport (= 7.0.4.1)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
Expand All @@ -57,22 +57,22 @@ GEM
activemodel (>= 4.1, < 7.1)
case_transform (>= 0.2)
jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
activejob (7.0.4)
activesupport (= 7.0.4)
activejob (7.0.4.1)
activesupport (= 7.0.4.1)
globalid (>= 0.3.6)
activemodel (7.0.4)
activesupport (= 7.0.4)
activerecord (7.0.4)
activemodel (= 7.0.4)
activesupport (= 7.0.4)
activestorage (7.0.4)
actionpack (= 7.0.4)
activejob (= 7.0.4)
activerecord (= 7.0.4)
activesupport (= 7.0.4)
activemodel (7.0.4.1)
activesupport (= 7.0.4.1)
activerecord (7.0.4.1)
activemodel (= 7.0.4.1)
activesupport (= 7.0.4.1)
activestorage (7.0.4.1)
actionpack (= 7.0.4.1)
activejob (= 7.0.4.1)
activerecord (= 7.0.4.1)
activesupport (= 7.0.4.1)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (7.0.4)
activesupport (7.0.4.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
Expand All @@ -94,17 +94,12 @@ GEM
activesupport
coderay (1.1.3)
concurrent-ruby (1.1.10)
coveralls_reborn (0.26.0)
simplecov (~> 0.22.0)
term-ansicolor (~> 1.7)
thor (~> 1.2)
tins (~> 1.32)
crass (1.0.6)
date (3.3.3)
debug_inspector (1.1.0)
docile (1.4.0)
erubi (1.11.0)
globalid (1.0.0)
erubi (1.12.0)
globalid (1.0.1)
activesupport (>= 5.0)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
Expand All @@ -113,17 +108,17 @@ GEM
loofah (2.19.1)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.8.0)
mail (2.8.0.1)
mini_mime (>= 0.1.1)
net-imap
net-pop
net-smtp
marcel (1.0.2)
method_source (1.0.0)
mini_mime (1.1.2)
mini_portile2 (2.8.0)
minitest (5.16.3)
net-imap (0.3.3)
mini_portile2 (2.8.1)
minitest (5.17.0)
net-imap (0.3.4)
date
net-protocol
net-pop (0.1.2)
Expand All @@ -133,84 +128,80 @@ GEM
net-smtp (0.3.3)
net-protocol
nio4r (2.5.8)
nokogiri (1.13.10)
nokogiri (1.14.0)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
parallel (1.22.1)
parser (3.1.3.0)
parser (3.2.0.0)
ast (~> 2.4.1)
pg (1.4.5)
pry (0.14.1)
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
pry-rails (0.3.9)
pry (>= 0.10.4)
racc (1.6.1)
rack (2.2.4)
racc (1.6.2)
rack (2.2.6.2)
rack-test (2.0.2)
rack (>= 1.3)
rails (7.0.4)
actioncable (= 7.0.4)
actionmailbox (= 7.0.4)
actionmailer (= 7.0.4)
actionpack (= 7.0.4)
actiontext (= 7.0.4)
actionview (= 7.0.4)
activejob (= 7.0.4)
activemodel (= 7.0.4)
activerecord (= 7.0.4)
activestorage (= 7.0.4)
activesupport (= 7.0.4)
rails (7.0.4.1)
actioncable (= 7.0.4.1)
actionmailbox (= 7.0.4.1)
actionmailer (= 7.0.4.1)
actionpack (= 7.0.4.1)
actiontext (= 7.0.4.1)
actionview (= 7.0.4.1)
activejob (= 7.0.4.1)
activemodel (= 7.0.4.1)
activerecord (= 7.0.4.1)
activestorage (= 7.0.4.1)
activesupport (= 7.0.4.1)
bundler (>= 1.15.0)
railties (= 7.0.4)
railties (= 7.0.4.1)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.4.4)
rails-html-sanitizer (1.5.0)
loofah (~> 2.19, >= 2.19.1)
railties (7.0.4)
actionpack (= 7.0.4)
activesupport (= 7.0.4)
railties (7.0.4.1)
actionpack (= 7.0.4.1)
activesupport (= 7.0.4.1)
method_source
rake (>= 12.2)
thor (~> 1.0)
zeitwerk (~> 2.5)
rainbow (3.1.1)
rake (13.0.6)
regexp_parser (2.6.1)
regexp_parser (2.6.2)
rexml (3.2.5)
rubocop (1.41.0)
rubocop (1.43.0)
json (~> 2.3)
parallel (~> 1.10)
parser (>= 3.1.2.1)
parser (>= 3.2.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.23.0, < 2.0)
rubocop-ast (>= 1.24.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.24.0)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.24.1)
parser (>= 3.1.1.0)
rubocop-shopify (2.10.1)
rubocop (~> 1.35)
rubocop-shopify (2.11.1)
rubocop (~> 1.42)
ruby-progressbar (1.11.0)
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov-lcov (0.8.0)
simplecov_json_formatter (0.1.4)
sqlite3 (1.4.4)
sync (0.5.0)
term-ansicolor (1.7.1)
tins (~> 1.0)
thor (1.2.1)
timeout (0.3.1)
tins (1.32.1)
sync
tzinfo (2.0.5)
concurrent-ruby (~> 1.0)
unicode-display_width (2.3.0)
unicode-display_width (2.4.2)
web-console (4.2.0)
actionview (>= 6.0.0)
activemodel (>= 6.0.0)
Expand All @@ -231,14 +222,15 @@ DEPENDENCIES
better_errors
binding_of_caller
byebug
coveralls_reborn
minitest (>= 5.0)
pg
pry-rails
rails (~> 7.0.4)
rake (>= 12.0)
rest_framework!
rubocop-shopify
simplecov
simplecov-lcov (= 0.8.0)
sqlite3 (~> 1.4.0)
web-console
webrick
Expand Down
2 changes: 1 addition & 1 deletion lib/rest_framework/engine.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
class RESTFramework::Engine < ::Rails::Engine
class RESTFramework::Engine < Rails::Engine
end

0 comments on commit ccbe72c

Please sign in to comment.