Skip to content

Commit 59a3cb5

Browse files
committed
Update CI step
1 parent 0e209a1 commit 59a3cb5

8 files changed

Lines changed: 43 additions & 16 deletions

File tree

.github/actions/install-cocoapods/action.yml

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,35 @@ description: Install cocoapods for sample app
44
runs:
55
using: composite
66
steps:
7-
- name: Cache cocoapods
8-
id: cache-cocoapods
9-
uses: actions/cache@v4
7+
- name: Setup Ruby
8+
uses: ruby/setup-ruby@829114fc20da43a41d27359103ec7a63020954d4 # v1.255.0
109
with:
11-
path: |
12-
**/ios/Pods
13-
key: ${{ runner.os }}-cocoapods-${{ hashFiles('sample/ios/Podfile.lock') }}
14-
restore-keys: |
15-
${{ runner.os }}-cocoapods-
10+
bundler-cache: true
11+
ruby-version: 3.1.2
12+
working-directory: sample
13+
14+
# - name: Cache cocoapods
15+
# id: cache-cocoapods
16+
# uses: actions/cache@v4
17+
# with:
18+
# path: |
19+
# **/ios/Pods
20+
# key: ${{ runner.os }}-cocoapods-ruby-3.1.2-${{ hashFiles('sample/ios/Podfile.lock', 'sample/Gemfile.lock') }}
21+
# restore-keys: |
22+
# ${{ runner.os }}-cocoapods-ruby-3.1.2-${{ hashFiles('sample/ios/Podfile.lock') }}
23+
# ${{ runner.os }}-cocoapods-ruby-3.1.2-
24+
# ${{ runner.os }}-cocoapods-
1625

1726
- name: Install cocoapods
18-
if: steps.cocoapods-cache.outputs.cache-hit != 'true'
27+
# if: steps.cache-cocoapods.outputs.cache-hit != 'true'
1928
shell: bash
2029
env:
2130
NO_FLIPPER: "1"
2231
run: |
32+
set -euo pipefail
2333
ROOT=$(pwd)
2434
cd sample
2535
bundle install
2636
cd ios
27-
NO_FLIPPER=1 bundle exec pod install
37+
NO_FLIPPER=1 bundle exec pod install --no-repo-update
2838
cd $ROOT

.github/actions/setup-simulator/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ runs:
1212
xcrun simctl list runtimes
1313
xcrun simctl list devicetypes
1414
xcrun simctl delete all
15-
CURRENT_SIMULATOR_UUID=$(xcrun simctl create TestDevice "iPhone 15 Pro")
15+
CURRENT_SIMULATOR_UUID=$(xcrun simctl create TestDevice "iPhone 16 Pro")
1616
echo "CURRENT_SIMULATOR_UUID=$CURRENT_SIMULATOR_UUID" >> $GITHUB_ENV

.github/workflows/ci.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,21 @@ jobs:
109109
110110
test-ios:
111111
name: Run iOS Tests
112-
runs-on: macos-13-xlarge
112+
runs-on: macos-15-xlarge
113+
timeout-minutes: 20
113114
needs: [lint, lint-swift, test]
114115
steps:
115116
- name: Checkout
116117
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
117118

119+
- name: Switch to Xcode 16.4
120+
run: |
121+
sudo xcode-select --switch /Applications/Xcode_16.4.app
122+
123+
- name: Display Current Xcode Information
124+
run: |
125+
echo "Xcode Path: $(xcode-select -p)"
126+
echo "Xcode Version: $(xcrun xcodebuild -version)"
118127
- name: Setup iOS Simulator
119128
uses: ./.github/actions/setup-simulator
120129

sample/Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
99
gem 'xcodeproj', '< 1.26.0'
1010
gem 'concurrent-ruby', '<= 1.3.4'
1111
gem 'cocoapods-check', '1.1.0'
12+
gem 'xcpretty'

sample/Gemfile.lock

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ GEM
9292
nkf (0.2.0)
9393
public_suffix (4.0.7)
9494
rexml (3.4.1)
95+
rouge (3.28.0)
9596
ruby-macho (2.5.1)
9697
securerandom (0.4.1)
9798
typhoeus (1.4.1)
@@ -105,6 +106,8 @@ GEM
105106
colored2 (~> 3.1)
106107
nanaimo (~> 0.3.0)
107108
rexml (>= 3.3.6, < 4.0)
109+
xcpretty (0.4.1)
110+
rouge (~> 3.28.0)
108111

109112
PLATFORMS
110113
ruby
@@ -115,6 +118,7 @@ DEPENDENCIES
115118
cocoapods-check (= 1.1.0)
116119
concurrent-ruby (<= 1.3.4)
117120
xcodeproj (< 1.26.0)
121+
xcpretty
118122

119123
RUBY VERSION
120124
ruby 3.1.2p20

sample/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,10 @@
6464
},
6565
"overrides": [
6666
{
67-
"files": ["*.ts", "*.tsx"],
67+
"files": [
68+
"*.ts",
69+
"*.tsx"
70+
],
6871
"rules": {
6972
"@typescript-eslint/consistent-type-imports": "error"
7073
}

sample/scripts/build_ios

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set -eo pipefail
66
if [[ -n $CURRENT_SIMULATOR_UUID ]]; then
77
dest="id=$CURRENT_SIMULATOR_UUID"
88
else
9-
dest="platform=iOS Simulator,name=iPhone 15 Pro"
9+
dest="platform=iOS Simulator,name=iPhone 16 Pro"
1010
fi
1111

1212
cd ios

sample/scripts/test_ios

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ set -eo pipefail
66
if [[ -n $CURRENT_SIMULATOR_UUID ]]; then
77
dest="id=$CURRENT_SIMULATOR_UUID"
88
else
9-
dest="platform=iOS Simulator,name=iPhone 15 Pro"
9+
dest="platform=iOS Simulator,name=iPhone 16 Pro"
1010
fi
1111

1212
cd ios
1313

14-
xcodebuild build-for-testing test -workspace ReactNative.xcworkspace -scheme ReactNative -destination "$dest" -skipPackagePluginValidation -sdk iphonesimulator ASSETCATALOG_COMPILER_OPTIMIZATION=time COMPILER_INDEX_STORE_ENABLE=NO | xcpretty -c
14+
xcodebuild build-for-testing test -workspace ReactNative.xcworkspace -scheme ReactNative -destination "$dest" -skipPackagePluginValidation -sdk iphonesimulator ASSETCATALOG_COMPILER_OPTIMIZATION=time COMPILER_INDEX_STORE_ENABLE=NO | bundle exec xcpretty -c

0 commit comments

Comments
 (0)