From d659504906bbe80080d4979cea342eaeaee662b2 Mon Sep 17 00:00:00 2001 From: Tommy Nguyen <4123478+tido64@users.noreply.github.com> Date: Mon, 22 Nov 2021 10:55:00 +0100 Subject: [PATCH 1/6] ci: fix CI failing on `bundle install` --- .github/workflows/build.yml | 6 +++++- Gemfile.lock | 14 +++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ecfe8bbde..bf4348675 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,6 +41,11 @@ jobs: uses: actions/setup-node@v2.4.1 with: node-version: 14 + - name: Set up Ruby + uses: ruby/setup-ruby@v1.86.0 + with: + ruby-version: '3.0' + bundler-cache: true - name: Checkout uses: actions/checkout@v2 with: @@ -67,7 +72,6 @@ jobs: scripts/clang-format-diff.sh || true - name: CocoaPods run: | - bundle install echo "::add-matcher::.github/rubocop.json" bundle exec rubocop echo "::remove-matcher owner=rubocop::" diff --git a/Gemfile.lock b/Gemfile.lock index 5eeb7b55d..43da0c40f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,7 +4,7 @@ GEM GEM remote: https://rubygems.org/ specs: - CFPropertyList (3.0.4) + CFPropertyList (3.0.5) rexml ast (2.4.2) atomos (0.1.3) @@ -12,27 +12,27 @@ GEM colored2 (3.1.2) minitest (5.14.4) nanaimo (0.3.0) - parallel (1.20.1) + parallel (1.21.0) parser (3.0.2.0) ast (~> 2.4.1) rainbow (3.0.0) regexp_parser (2.1.1) rexml (3.2.5) - rubocop (1.20.0) + rubocop (1.23.0) parallel (~> 1.10) parser (>= 3.0.0.0) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml - rubocop-ast (>= 1.9.1, < 2.0) + rubocop-ast (>= 1.12.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.11.0) + rubocop-ast (1.13.0) parser (>= 3.0.1.1) - rubocop-minitest (0.15.0) + rubocop-minitest (0.16.0) rubocop (>= 0.90, < 2.0) ruby-progressbar (1.11.0) - unicode-display_width (2.0.0) + unicode-display_width (2.1.0) xcodeproj (1.21.0) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) From 053443a7155f7ebe59b8e3a62dd1f199235061f4 Mon Sep 17 00:00:00 2001 From: Tommy Nguyen <4123478+tido64@users.noreply.github.com> Date: Mon, 22 Nov 2021 11:12:43 +0100 Subject: [PATCH 2/6] specify Gemlock.file? --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bf4348675..9ccbb4ad3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,6 +45,7 @@ jobs: uses: ruby/setup-ruby@v1.86.0 with: ruby-version: '3.0' + bundler: Gemfile.lock bundler-cache: true - name: Checkout uses: actions/checkout@v2 From 80555b95717ea0cc8679148b999140c55c92e8ae Mon Sep 17 00:00:00 2001 From: Tommy Nguyen <4123478+tido64@users.noreply.github.com> Date: Mon, 22 Nov 2021 12:56:40 +0100 Subject: [PATCH 3/6] explicitly set working directory? --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9ccbb4ad3..74647a79b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,6 +47,7 @@ jobs: ruby-version: '3.0' bundler: Gemfile.lock bundler-cache: true + working-directory: . - name: Checkout uses: actions/checkout@v2 with: @@ -73,6 +74,7 @@ jobs: scripts/clang-format-diff.sh || true - name: CocoaPods run: | + bundle install echo "::add-matcher::.github/rubocop.json" bundle exec rubocop echo "::remove-matcher owner=rubocop::" From 8c76a08407e39dc9aaa334a112cf306e0db38c02 Mon Sep 17 00:00:00 2001 From: Tommy Nguyen <4123478+tido64@users.noreply.github.com> Date: Mon, 22 Nov 2021 13:05:14 +0100 Subject: [PATCH 4/6] set up Ruby after checkout to find Gemfile --- .github/workflows/build.yml | 14 ++++++-------- ios/test_app.rb | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 74647a79b..5b88e2f33 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,13 +41,6 @@ jobs: uses: actions/setup-node@v2.4.1 with: node-version: 14 - - name: Set up Ruby - uses: ruby/setup-ruby@v1.86.0 - with: - ruby-version: '3.0' - bundler: Gemfile.lock - bundler-cache: true - working-directory: . - name: Checkout uses: actions/checkout@v2 with: @@ -60,6 +53,12 @@ jobs: with: path: .yarn/cache key: ${{ hashFiles('yarn.lock') }} + - name: Set up Ruby + uses: ruby/setup-ruby@v1.86.0 + with: + ruby-version: '3.0' + bundler: Gemfile.lock + bundler-cache: true - name: Install run: | yarn @@ -74,7 +73,6 @@ jobs: scripts/clang-format-diff.sh || true - name: CocoaPods run: | - bundle install echo "::add-matcher::.github/rubocop.json" bundle exec rubocop echo "::remove-matcher owner=rubocop::" diff --git a/ios/test_app.rb b/ios/test_app.rb index f5516689c..0d0451613 100644 --- a/ios/test_app.rb +++ b/ios/test_app.rb @@ -231,7 +231,7 @@ def make_project!(xcodeproj, project_root, target_platform) react_native = react_native_path(project_root, target_platform) version = package_version(react_native.to_s).segments - version = version[0] * 10_000 + version[1] * 100 + version[2] + version = (version[0] * 10_000) + (version[1] * 100) + version[2] version_macro = "REACT_NATIVE_VERSION=#{version}" build_settings = {} From a21fb27ec972540d83ba1c9865cabc9d19008872 Mon Sep 17 00:00:00 2001 From: Tommy Nguyen <4123478+tido64@users.noreply.github.com> Date: Mon, 22 Nov 2021 13:32:31 +0100 Subject: [PATCH 5/6] only scan checked in files --- .rubocop.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.rubocop.yml b/.rubocop.yml index 201a8f1e8..5d007a442 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,5 +1,8 @@ AllCops: NewCops: enable + Include: + - "**/*.rb" + - Gemfile Exclude: - "**/node_modules/**/*" TargetRubyVersion: 2.6 From a44726264d7ec93dc0a9a7ce132f11a094cfdb3c Mon Sep 17 00:00:00 2001 From: Tommy Nguyen <4123478+tido64@users.noreply.github.com> Date: Mon, 22 Nov 2021 13:49:13 +0100 Subject: [PATCH 6/6] exclude gems install path --- .rubocop.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 5d007a442..92559cae7 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,10 +1,8 @@ AllCops: NewCops: enable - Include: - - "**/*.rb" - - Gemfile Exclude: - "**/node_modules/**/*" + - "vendor/bundle/**/*" TargetRubyVersion: 2.6 Layout/LineLength: