Skip to content

Commit a81aa1f

Browse files
authored
Merge pull request #93 from rossta/chore/update-ruby-support
Switch to CircleCi and update supported versions for Ruby and Rails
2 parents 66e1e01 + f31ca89 commit a81aa1f

36 files changed

+1116
-280
lines changed

.circleci/config.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
version: 2.1
2+
3+
orbs:
4+
ruby: circleci/ruby@1.1.0
5+
node: circleci/node@2
6+
7+
commands:
8+
bundle-install:
9+
description: Install gem dependency matrix
10+
steps:
11+
- run: ruby -v
12+
- run: echo $RAILS_ENV
13+
- run: echo $RACK_ENV
14+
- run: 'shasum Gemfile.lock gemfiles/*.lock > checksum.tmp'
15+
- run: bundle config set path ~/vendor/bundle
16+
- restore_cache:
17+
keys:
18+
- gems-v1.0-{{ checksum "./checksum.tmp" }}
19+
- gems-v1.0-
20+
- run: bundle install
21+
- run: bundle exec appraisal install
22+
- save_cache:
23+
key: gems-v1.0-{{ checksum "./checksum.tmp" }}
24+
paths:
25+
- ~/vendor/bundle
26+
yarn-install:
27+
description: Install NPM dependencies
28+
steps:
29+
- restore_cache:
30+
keys:
31+
- npm-v2-{{ checksum "./test/sample/yarn.lock" }}
32+
- npm-v2-
33+
- run: bundle exec rake app:yarn_install_frozen
34+
- save_cache:
35+
key: npm-v2-{{ checksum "./test/sample/yarn.lock" }}
36+
paths:
37+
- ./test/sample/node_modules
38+
39+
ruby-test:
40+
description: Run tests against various Rails versions
41+
steps:
42+
- run: bundle exec appraisal rake test
43+
44+
jobs:
45+
test:
46+
working_directory: ~/serviceworker-rails
47+
docker:
48+
- image: cimg/ruby:<<parameters.version>>-node
49+
parameters:
50+
version:
51+
description: 'version tag'
52+
default: '2.7'
53+
type: string
54+
environment:
55+
BUNDLE_JOBS: '3'
56+
BUNDLE_RETRY: '3'
57+
BUNDLE_PATH: vendor/bundle
58+
RAILS_ENV: test
59+
NODE_ENV: development
60+
steps:
61+
- checkout
62+
- bundle-install
63+
- yarn-install
64+
- ruby-test
65+
- run: bundle exec standardrb
66+
67+
workflows:
68+
test:
69+
jobs:
70+
- test:
71+
matrix:
72+
parameters:
73+
version: ['2.5', '2.6', '2.7']

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/.bundle/
22
/.yardoc
3-
/Gemfile.lock
43
/_yardoc/
54
/coverage/
65
/doc/
@@ -9,7 +8,6 @@
98
**/tmp/
109
**/log/
1110
**/node_modules/
12-
/gemfiles/*.lock
1311
.byebug_history
1412
.ruby-gemset
1513
.ruby-version

.rubocop.yml

Lines changed: 0 additions & 105 deletions
This file was deleted.

.standard.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ignore: # default: []
2+
- 'test/sample/node_modules/**/*'

.travis.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

Appraisals

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
11
# frozen_string_literal: true
22

3-
appraise "rails-3.2" do
4-
gem "rails", "~> 3.2"
5-
gem "test-unit", "~> 3.0"
6-
end
7-
8-
appraise "rails-4.2" do
9-
gem "rails", "~> 4.2"
10-
gem "webpacker"
11-
end
12-
133
appraise "rails-5.0" do
144
gem "rails", "~> 5.0"
155
gem "webpacker"
@@ -22,5 +12,10 @@ end
2212

2313
appraise "rails-5.2" do
2414
gem "rails", "~> 5.2"
25-
gem "webpacker", "~> 3.4"
15+
gem "webpacker", ">= 4.1"
2616
end
17+
18+
# appraise "rails-6.0" do
19+
# gem "rails", "~> 6.0"
20+
# gem "webpacker", ">= 4.1"
21+
# end

0 commit comments

Comments
 (0)