Skip to content

Commit

Permalink
Support Ruby versions 3.x (#129)
Browse files Browse the repository at this point in the history
* Update GitHub workflows

- Update actions to latest versions.
- Run actions against Ruby 2.7 and 3.x.

Co-authored-by: Grzegorz Jakubiak <[email protected]>

* Restore Gemfile.lock

Co-authored-by: Grzegorz Jakubiak <[email protected]>

* Fix Rubocops for newer versions

Co-authored-by: Grzegorz Jakubiak <[email protected]>

---------

Co-authored-by: Grzegorz Jakubiak <[email protected]>
  • Loading branch information
tmarkanov and gregg-platogo authored Feb 2, 2023
1 parent 72cb323 commit dffdff7
Show file tree
Hide file tree
Showing 4 changed files with 175 additions and 25 deletions.
56 changes: 34 additions & 22 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@ jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
ruby_versions: [2.7, 3.0, 3.1, 3.2]

steps:
- uses: actions/checkout@v2
- name: Set up Ruby 2.7
uses: actions/setup-ruby@v1
- uses: actions/checkout@v3
- name: Set up Ruby ${{ matrix.ruby_versions }}
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.x
- uses: actions/cache@v1
ruby-version: ${{ matrix.ruby_versions }}
- uses: actions/cache@v3
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
Expand All @@ -31,7 +34,7 @@ jobs:
- name: Build
run: bundle exec rake build
- name: Upload Gem
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v3
with:
name: app_store_connect-${{ env.APP_STORE_CONNECT_VERSION }}.gem
path: app_store_connect-${{ env.APP_STORE_CONNECT_VERSION }}.gem
Expand All @@ -40,14 +43,17 @@ jobs:
name: Lint
runs-on: ubuntu-latest
needs: [build]
strategy:
matrix:
ruby_versions: [2.7, 3.0, 3.1, 3.2]

steps:
- uses: actions/checkout@v2
- name: Set up Ruby 2.7
uses: actions/setup-ruby@v1
- uses: actions/checkout@v3
- name: Set up Ruby ${{ matrix.ruby_versions }}
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.x
- uses: actions/cache@v1
ruby-version: ${{ matrix.ruby_versions }}
- uses: actions/cache@v3
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
Expand All @@ -65,14 +71,17 @@ jobs:
name: Test
runs-on: ubuntu-latest
needs: [build]
strategy:
matrix:
ruby_versions: [2.7, 3.0, 3.1, 3.2]

steps:
- uses: actions/checkout@v2
- name: Set up Ruby 2.7
uses: actions/setup-ruby@v1
- uses: actions/checkout@v3
- name: Set up Ruby ${{ matrix.ruby_versions }}
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.x
- uses: actions/cache@v1
ruby-version: ${{ matrix.ruby_versions }}
- uses: actions/cache@v3
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
Expand All @@ -91,14 +100,17 @@ jobs:
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
needs: [test, lint]
strategy:
matrix:
ruby_versions: [2.7, 3.0, 3.1, 3.2]

steps:
- uses: actions/checkout@v2
- name: Set up Ruby 2.7
uses: actions/setup-ruby@v1
- uses: actions/checkout@v3
- name: Set up Ruby ${{ matrix.ruby_versions }}
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.x
- uses: actions/cache@v1
ruby-version: ${{ matrix.ruby_versions }}
- uses: actions/cache@v3
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
Expand All @@ -119,7 +131,7 @@ jobs:
run: bundle install --jobs 4 --retry 3
- name: Set APP_STORE_CONNECT_VERSION
run: echo "APP_STORE_CONNECT_VERSION=$(bundle exec rake version:current)" >> $GITHUB_ENV
- uses: actions/download-artifact@v1
- uses: actions/download-artifact@v3
with:
name: app_store_connect-${{ env.APP_STORE_CONNECT_VERSION }}.gem
path: /tmp
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@
.rspec_status
.DS_Store
*.gem
Gemfile.lock
8 changes: 6 additions & 2 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
#
# See https://github.com/rubocop-hq/rubocop/blob/master/manual/configuration.md
#
AllCops:
NewCops: disable
TargetRubyVersion: 2.7

Metrics/MethodLength:
Enabled: false

Expand All @@ -18,9 +22,9 @@ Metrics/BlockLength:
Style/Documentation:
Enabled: false

Metrics/LineLength:
Layout/LineLength:
Enabled: false

Metrics/ClassLength:
Metrics/ClassLength:
Enabled: false

135 changes: 135 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
PATH
remote: .
specs:
app_store_connect (0.29.0)
activesupport (>= 7.0.4)
jwt (>= 1.4)

GEM
remote: https://rubygems.org/
specs:
activesupport (7.0.4)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
ast (2.4.2)
coderay (1.1.3)
concurrent-ruby (1.1.10)
crack (0.4.5)
rexml
diff-lcs (1.5.0)
docile (1.4.0)
factory_bot (6.2.1)
activesupport (>= 5.0.0)
ffi (1.15.5)
formatador (1.1.0)
guard (2.18.0)
formatador (>= 0.2.4)
listen (>= 2.7, < 4.0)
lumberjack (>= 1.0.12, < 2.0)
nenv (~> 0.1)
notiffany (~> 0.0)
pry (>= 0.13.0)
shellany (~> 0.0)
thor (>= 0.18.1)
guard-compat (1.2.1)
guard-rspec (4.7.3)
guard (~> 2.1)
guard-compat (~> 1.1)
rspec (>= 2.99.0, < 4.0)
hashdiff (1.0.1)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
json (2.6.2)
jwt (2.7.0)
listen (3.7.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
lumberjack (1.2.8)
method_source (1.0.0)
minitest (5.16.3)
nenv (0.3.0)
notiffany (0.1.3)
nenv (~> 0.1)
shellany (~> 0.0)
parallel (1.22.1)
parser (3.1.2.1)
ast (~> 2.4.1)
pry (0.14.1)
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (5.0.0)
rainbow (3.1.1)
rake (13.0.6)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
regexp_parser (2.5.0)
rexml (3.2.5)
rspec (3.11.0)
rspec-core (~> 3.11.0)
rspec-expectations (~> 3.11.0)
rspec-mocks (~> 3.11.0)
rspec-core (3.11.0)
rspec-support (~> 3.11.0)
rspec-expectations (3.11.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.11.0)
rspec-mocks (3.11.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.11.0)
rspec-support (3.11.1)
rubocop (1.36.0)
json (~> 2.3)
parallel (~> 1.10)
parser (>= 3.1.2.1)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.20.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.21.0)
parser (>= 3.1.1.0)
ruby-progressbar (1.11.0)
semantic (1.6.1)
shellany (0.0.1)
simplecov (0.21.2)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.4)
thor (1.2.1)
timecop (0.9.5)
tzinfo (2.0.5)
concurrent-ruby (~> 1.0)
unicode-display_width (2.3.0)
webmock (3.18.1)
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)

PLATFORMS
arm64-darwin-21
x86_64-darwin-22

DEPENDENCIES
app_store_connect!
bundler
factory_bot (~> 6.2.1)
guard-rspec (~> 4.7.3)
pry (~> 0.14.1)
rake (~> 13.0.6)
rspec (~> 3.11.0)
rubocop (~> 1.36.0)
semantic (~> 1.6.1)
simplecov (~> 0.21.2)
timecop (~> 0.9.5)
webmock (~> 3.18.1)

BUNDLED WITH
2.3.22

0 comments on commit dffdff7

Please sign in to comment.