Skip to content

Commit da5a125

Browse files
committed
CI: Replace Travis with GitHub Actions.
Update gems to satisfy dependabot.
1 parent f5936a2 commit da5a125

File tree

6 files changed

+165
-96
lines changed

6 files changed

+165
-96
lines changed

.github/workflows/pipeline.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Pipeline
2+
on: push
3+
jobs:
4+
check:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- name: Checkout code
8+
uses: actions/checkout@v3
9+
- name: Install Ruby and gems
10+
uses: ruby/setup-ruby@v1
11+
with:
12+
bundler-cache: true
13+
- name: Run code checks
14+
run: bundle exec rubocop
15+
test:
16+
needs: check
17+
runs-on: ubuntu-latest
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
ruby: [2.6.8, 2.7.5, 3.0.4]
22+
rails: [6.0.6, 6.1.4, 7.0.4]
23+
exclude:
24+
- ruby: 2.6.8
25+
rails: 7.0.4
26+
env:
27+
RAILS_VERSION: ${{ matrix.rails }}
28+
steps:
29+
- name: Checkout code
30+
uses: actions/checkout@v3
31+
- name: Remove `Gemfile.lock` because this is a matrix job
32+
run: rm Gemfile.lock
33+
- name: Install Ruby and gems
34+
uses: ruby/setup-ruby@v1
35+
with:
36+
ruby-version: ${{ matrix.ruby }}
37+
bundler-cache: true
38+
- name: Execute migrations
39+
run: bin/rails db:migrate
40+
- name: Run tests
41+
run: BACKTRACE=1 bin/rails test
42+
- name: Check if coverage LCOV file exists
43+
id: lcov_exists
44+
uses: andstor/file-existence-action@v2
45+
with:
46+
files: coverage/lcov.info
47+
- name: Submit coverage to `coveralls.io` if LCOV file exists
48+
uses: coverallsapp/github-action@master
49+
if: steps.lcov_exists.outputs.files_exists == 'true'
50+
with:
51+
github-token: ${{ secrets.GITHUB_TOKEN }}
52+
release:
53+
needs: test
54+
runs-on: ubuntu-latest
55+
if: startsWith(github.ref, 'refs/tags/')
56+
steps:
57+
- name: Checkout code
58+
uses: actions/checkout@v3
59+
with:
60+
fetch-depth: 0
61+
- name: Ensure latest tag is fetched
62+
run: git fetch --prune --tags --force
63+
- name: Install Ruby
64+
uses: ruby/setup-ruby@v1
65+
- name: Build the gem
66+
run: gem build rest_framework.gemspec -o rest_framework.gem
67+
- name: Push to RubyGems
68+
env:
69+
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
70+
run: gem push rest_framework.gem
File renamed without changes.

Gemfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ group :development do
3232
end
3333

3434
group :test do
35-
gem "coveralls_reborn", require: false
3635
gem "minitest", ">= 5.0"
36+
gem "simplecov"
37+
gem "simplecov-lcov", "0.8.0", require: false
3738
end
3839

3940
group :development, :test do

Gemfile.lock

Lines changed: 77 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -7,47 +7,47 @@ PATH
77
GEM
88
remote: https://rubygems.org/
99
specs:
10-
actioncable (7.0.4)
11-
actionpack (= 7.0.4)
12-
activesupport (= 7.0.4)
10+
actioncable (7.0.4.1)
11+
actionpack (= 7.0.4.1)
12+
activesupport (= 7.0.4.1)
1313
nio4r (~> 2.0)
1414
websocket-driver (>= 0.6.1)
15-
actionmailbox (7.0.4)
16-
actionpack (= 7.0.4)
17-
activejob (= 7.0.4)
18-
activerecord (= 7.0.4)
19-
activestorage (= 7.0.4)
20-
activesupport (= 7.0.4)
15+
actionmailbox (7.0.4.1)
16+
actionpack (= 7.0.4.1)
17+
activejob (= 7.0.4.1)
18+
activerecord (= 7.0.4.1)
19+
activestorage (= 7.0.4.1)
20+
activesupport (= 7.0.4.1)
2121
mail (>= 2.7.1)
2222
net-imap
2323
net-pop
2424
net-smtp
25-
actionmailer (7.0.4)
26-
actionpack (= 7.0.4)
27-
actionview (= 7.0.4)
28-
activejob (= 7.0.4)
29-
activesupport (= 7.0.4)
25+
actionmailer (7.0.4.1)
26+
actionpack (= 7.0.4.1)
27+
actionview (= 7.0.4.1)
28+
activejob (= 7.0.4.1)
29+
activesupport (= 7.0.4.1)
3030
mail (~> 2.5, >= 2.5.4)
3131
net-imap
3232
net-pop
3333
net-smtp
3434
rails-dom-testing (~> 2.0)
35-
actionpack (7.0.4)
36-
actionview (= 7.0.4)
37-
activesupport (= 7.0.4)
35+
actionpack (7.0.4.1)
36+
actionview (= 7.0.4.1)
37+
activesupport (= 7.0.4.1)
3838
rack (~> 2.0, >= 2.2.0)
3939
rack-test (>= 0.6.3)
4040
rails-dom-testing (~> 2.0)
4141
rails-html-sanitizer (~> 1.0, >= 1.2.0)
42-
actiontext (7.0.4)
43-
actionpack (= 7.0.4)
44-
activerecord (= 7.0.4)
45-
activestorage (= 7.0.4)
46-
activesupport (= 7.0.4)
42+
actiontext (7.0.4.1)
43+
actionpack (= 7.0.4.1)
44+
activerecord (= 7.0.4.1)
45+
activestorage (= 7.0.4.1)
46+
activesupport (= 7.0.4.1)
4747
globalid (>= 0.6.0)
4848
nokogiri (>= 1.8.5)
49-
actionview (7.0.4)
50-
activesupport (= 7.0.4)
49+
actionview (7.0.4.1)
50+
activesupport (= 7.0.4.1)
5151
builder (~> 3.1)
5252
erubi (~> 1.4)
5353
rails-dom-testing (~> 2.0)
@@ -57,22 +57,22 @@ GEM
5757
activemodel (>= 4.1, < 7.1)
5858
case_transform (>= 0.2)
5959
jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
60-
activejob (7.0.4)
61-
activesupport (= 7.0.4)
60+
activejob (7.0.4.1)
61+
activesupport (= 7.0.4.1)
6262
globalid (>= 0.3.6)
63-
activemodel (7.0.4)
64-
activesupport (= 7.0.4)
65-
activerecord (7.0.4)
66-
activemodel (= 7.0.4)
67-
activesupport (= 7.0.4)
68-
activestorage (7.0.4)
69-
actionpack (= 7.0.4)
70-
activejob (= 7.0.4)
71-
activerecord (= 7.0.4)
72-
activesupport (= 7.0.4)
63+
activemodel (7.0.4.1)
64+
activesupport (= 7.0.4.1)
65+
activerecord (7.0.4.1)
66+
activemodel (= 7.0.4.1)
67+
activesupport (= 7.0.4.1)
68+
activestorage (7.0.4.1)
69+
actionpack (= 7.0.4.1)
70+
activejob (= 7.0.4.1)
71+
activerecord (= 7.0.4.1)
72+
activesupport (= 7.0.4.1)
7373
marcel (~> 1.0)
7474
mini_mime (>= 1.1.0)
75-
activesupport (7.0.4)
75+
activesupport (7.0.4.1)
7676
concurrent-ruby (~> 1.0, >= 1.0.2)
7777
i18n (>= 1.6, < 2)
7878
minitest (>= 5.1)
@@ -94,17 +94,12 @@ GEM
9494
activesupport
9595
coderay (1.1.3)
9696
concurrent-ruby (1.1.10)
97-
coveralls_reborn (0.26.0)
98-
simplecov (~> 0.22.0)
99-
term-ansicolor (~> 1.7)
100-
thor (~> 1.2)
101-
tins (~> 1.32)
10297
crass (1.0.6)
10398
date (3.3.3)
10499
debug_inspector (1.1.0)
105100
docile (1.4.0)
106-
erubi (1.11.0)
107-
globalid (1.0.0)
101+
erubi (1.12.0)
102+
globalid (1.0.1)
108103
activesupport (>= 5.0)
109104
i18n (1.12.0)
110105
concurrent-ruby (~> 1.0)
@@ -113,17 +108,17 @@ GEM
113108
loofah (2.19.1)
114109
crass (~> 1.0.2)
115110
nokogiri (>= 1.5.9)
116-
mail (2.8.0)
111+
mail (2.8.0.1)
117112
mini_mime (>= 0.1.1)
118113
net-imap
119114
net-pop
120115
net-smtp
121116
marcel (1.0.2)
122117
method_source (1.0.0)
123118
mini_mime (1.1.2)
124-
mini_portile2 (2.8.0)
125-
minitest (5.16.3)
126-
net-imap (0.3.3)
119+
mini_portile2 (2.8.1)
120+
minitest (5.17.0)
121+
net-imap (0.3.4)
127122
date
128123
net-protocol
129124
net-pop (0.1.2)
@@ -133,84 +128,80 @@ GEM
133128
net-smtp (0.3.3)
134129
net-protocol
135130
nio4r (2.5.8)
136-
nokogiri (1.13.10)
131+
nokogiri (1.14.0)
137132
mini_portile2 (~> 2.8.0)
138133
racc (~> 1.4)
139134
parallel (1.22.1)
140-
parser (3.1.3.0)
135+
parser (3.2.0.0)
141136
ast (~> 2.4.1)
142137
pg (1.4.5)
143-
pry (0.14.1)
138+
pry (0.14.2)
144139
coderay (~> 1.1)
145140
method_source (~> 1.0)
146141
pry-rails (0.3.9)
147142
pry (>= 0.10.4)
148-
racc (1.6.1)
149-
rack (2.2.4)
143+
racc (1.6.2)
144+
rack (2.2.6.2)
150145
rack-test (2.0.2)
151146
rack (>= 1.3)
152-
rails (7.0.4)
153-
actioncable (= 7.0.4)
154-
actionmailbox (= 7.0.4)
155-
actionmailer (= 7.0.4)
156-
actionpack (= 7.0.4)
157-
actiontext (= 7.0.4)
158-
actionview (= 7.0.4)
159-
activejob (= 7.0.4)
160-
activemodel (= 7.0.4)
161-
activerecord (= 7.0.4)
162-
activestorage (= 7.0.4)
163-
activesupport (= 7.0.4)
147+
rails (7.0.4.1)
148+
actioncable (= 7.0.4.1)
149+
actionmailbox (= 7.0.4.1)
150+
actionmailer (= 7.0.4.1)
151+
actionpack (= 7.0.4.1)
152+
actiontext (= 7.0.4.1)
153+
actionview (= 7.0.4.1)
154+
activejob (= 7.0.4.1)
155+
activemodel (= 7.0.4.1)
156+
activerecord (= 7.0.4.1)
157+
activestorage (= 7.0.4.1)
158+
activesupport (= 7.0.4.1)
164159
bundler (>= 1.15.0)
165-
railties (= 7.0.4)
160+
railties (= 7.0.4.1)
166161
rails-dom-testing (2.0.3)
167162
activesupport (>= 4.2.0)
168163
nokogiri (>= 1.6)
169-
rails-html-sanitizer (1.4.4)
164+
rails-html-sanitizer (1.5.0)
170165
loofah (~> 2.19, >= 2.19.1)
171-
railties (7.0.4)
172-
actionpack (= 7.0.4)
173-
activesupport (= 7.0.4)
166+
railties (7.0.4.1)
167+
actionpack (= 7.0.4.1)
168+
activesupport (= 7.0.4.1)
174169
method_source
175170
rake (>= 12.2)
176171
thor (~> 1.0)
177172
zeitwerk (~> 2.5)
178173
rainbow (3.1.1)
179174
rake (13.0.6)
180-
regexp_parser (2.6.1)
175+
regexp_parser (2.6.2)
181176
rexml (3.2.5)
182-
rubocop (1.41.0)
177+
rubocop (1.43.0)
183178
json (~> 2.3)
184179
parallel (~> 1.10)
185-
parser (>= 3.1.2.1)
180+
parser (>= 3.2.0.0)
186181
rainbow (>= 2.2.2, < 4.0)
187182
regexp_parser (>= 1.8, < 3.0)
188183
rexml (>= 3.2.5, < 4.0)
189-
rubocop-ast (>= 1.23.0, < 2.0)
184+
rubocop-ast (>= 1.24.1, < 2.0)
190185
ruby-progressbar (~> 1.7)
191-
unicode-display_width (>= 1.4.0, < 3.0)
192-
rubocop-ast (1.24.0)
186+
unicode-display_width (>= 2.4.0, < 3.0)
187+
rubocop-ast (1.24.1)
193188
parser (>= 3.1.1.0)
194-
rubocop-shopify (2.10.1)
195-
rubocop (~> 1.35)
189+
rubocop-shopify (2.11.1)
190+
rubocop (~> 1.42)
196191
ruby-progressbar (1.11.0)
197192
simplecov (0.22.0)
198193
docile (~> 1.1)
199194
simplecov-html (~> 0.11)
200195
simplecov_json_formatter (~> 0.1)
201196
simplecov-html (0.12.3)
197+
simplecov-lcov (0.8.0)
202198
simplecov_json_formatter (0.1.4)
203199
sqlite3 (1.4.4)
204-
sync (0.5.0)
205-
term-ansicolor (1.7.1)
206-
tins (~> 1.0)
207200
thor (1.2.1)
208201
timeout (0.3.1)
209-
tins (1.32.1)
210-
sync
211202
tzinfo (2.0.5)
212203
concurrent-ruby (~> 1.0)
213-
unicode-display_width (2.3.0)
204+
unicode-display_width (2.4.2)
214205
web-console (4.2.0)
215206
actionview (>= 6.0.0)
216207
activemodel (>= 6.0.0)
@@ -231,14 +222,15 @@ DEPENDENCIES
231222
better_errors
232223
binding_of_caller
233224
byebug
234-
coveralls_reborn
235225
minitest (>= 5.0)
236226
pg
237227
pry-rails
238228
rails (~> 7.0.4)
239229
rake (>= 12.0)
240230
rest_framework!
241231
rubocop-shopify
232+
simplecov
233+
simplecov-lcov (= 0.8.0)
242234
sqlite3 (~> 1.4.0)
243235
web-console
244236
webrick

lib/rest_framework/engine.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
class RESTFramework::Engine < ::Rails::Engine
1+
class RESTFramework::Engine < Rails::Engine
22
end

0 commit comments

Comments
 (0)