Skip to content

Commit e3e383d

Browse files
authored
Update actions/cache and actions/setup-node to v4 (#187)
- Previously used `actions/cache` to configure yarn cache - replaced with `actions/setup-node` - Update any other usage of `actions/cache` to v4 - Updates the demo app action to run on `macos-14` targeting `iPhone 15 Pro` device running ios `18.1`. I had previously attempted `macos-13` and `iPhone 14 Pro` but the build step took >20 minutes to complete, whereas `macos-14` the build took ~7 minutes (`macos-14` runs on m1 hardware) - Updated `futureware-tech/simulator-action` to `v4` and set some additional config values to get CI working - `actions/upload-artifact` also updated to `v4`
1 parent d3285f9 commit e3e383d

19 files changed

+536
-1226
lines changed

.github/workflows/demo-app.yml

Lines changed: 21 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,19 @@ on: [pull_request]
44

55
jobs:
66
run-visual-regression-ios:
7-
runs-on: macos-11
7+
runs-on: macos-14
88

99
steps:
10-
- uses: actions/setup-node@v3
11-
with:
12-
node-version: 16
10+
- uses: actions/checkout@v4
1311

14-
- uses: actions/checkout@v2
12+
- uses: actions/setup-node@v4
13+
with:
14+
node-version: 20
15+
cache: 'yarn'
1516

1617
- name: Get Runner Information
1718
run: /usr/bin/xcodebuild -version
1819

19-
- name: Get yarn cache directory path
20-
id: yarn-cache-dir-path
21-
run: echo "::set-output name=dir::$(yarn cache dir)"
22-
23-
- uses: actions/cache@v3
24-
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
25-
with:
26-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
27-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
28-
restore-keys: |
29-
${{ runner.os }}-yarn-
30-
3120
- name: Install Dependencies (Library)
3221
run: yarn install --frozen-lockfile
3322
working-directory: ./
@@ -43,7 +32,7 @@ jobs:
4332
- name: Install CocoaPods Gem
4433
run: gem install cocoapods -v 1.11.0
4534

46-
- uses: actions/cache@v2
35+
- uses: actions/cache@v4
4736
with:
4837
path: ./example/ios/Pods
4938
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
@@ -54,10 +43,13 @@ jobs:
5443
run: pod install
5544
working-directory: ./example/ios
5645

57-
- uses: futureware-tech/simulator-action@v1
46+
- uses: futureware-tech/simulator-action@v4
5847
with:
59-
model: 'iPhone 13 Pro'
60-
os_version: '>=15.0'
48+
model: 'iPhone 15 Pro'
49+
os_version: '18.1'
50+
erase_before_boot: true
51+
wait_for_boot: true
52+
shutdown_after_job: true
6153

6254
- name: Run Owl Build
6355
run: yarn owl:build:ios
@@ -68,30 +60,23 @@ jobs:
6860
working-directory: ./example
6961

7062
- name: Store screenshots and report as artifacts
71-
uses: actions/upload-artifact@v2
63+
uses: actions/upload-artifact@v4
7264
if: failure()
7365
with:
7466
name: owl-results
7567
path: example/.owl
7668

7769
run-visual-regression-android:
78-
runs-on: macos-11
70+
runs-on: macos-14
7971
if: ${{ false }}
8072

8173
steps:
82-
- uses: actions/checkout@v2
74+
- uses: actions/checkout@v4
8375

84-
- name: Get yarn cache directory path
85-
id: yarn-cache-dir-path
86-
run: echo "::set-output name=dir::$(yarn cache dir)"
87-
88-
- uses: actions/cache@v2
89-
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
76+
- uses: actions/setup-node@v4
9077
with:
91-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
92-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
93-
restore-keys: |
94-
${{ runner.os }}-yarn-
78+
node-version: 20
79+
cache: 'yarn'
9580

9681
- name: Install Dependencies (Library)
9782
run: yarn install --frozen-lockfile
@@ -105,7 +90,7 @@ jobs:
10590
run: yarn install --frozen-lockfile
10691
working-directory: ./example
10792

108-
- uses: actions/cache@v2
93+
- uses: actions/cache@v4
10994
with:
11095
path: |
11196
~/.gradle/caches
@@ -139,7 +124,7 @@ jobs:
139124
working-directory: ./example
140125

141126
- name: Store screenshots as artifacts
142-
uses: actions/upload-artifact@v2
127+
uses: actions/upload-artifact@v4
143128
if: failure()
144129
with:
145130
name: owl-screenshots

.github/workflows/demo-expo-app.yml

Lines changed: 10 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,16 @@ jobs:
1010
if: ${{ false }}
1111

1212
steps:
13-
- uses: actions/setup-node@v3
13+
- uses: actions/setup-node@v4
1414
with:
15-
node-version: 16
15+
node-version: 20
16+
cache: 'yarn'
1617

17-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v4
1819

1920
- name: Get Runner Information
2021
run: /usr/bin/xcodebuild -version
2122

22-
- name: Get yarn cache directory path
23-
id: yarn-cache-dir-path
24-
run: echo "::set-output name=dir::$(yarn cache dir)"
25-
26-
- uses: actions/cache@v3
27-
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
28-
with:
29-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
30-
key: ${{ runner.os }}-expo-yarn-${{ hashFiles('**/yarn.lock') }}
31-
restore-keys: |
32-
${{ runner.os }}-expo-yarn-
33-
3423
- name: Install Dependencies (Library)
3524
run: yarn install --frozen-lockfile
3625
working-directory: ./
@@ -46,7 +35,7 @@ jobs:
4635
- name: Install CocoaPods Gem
4736
run: gem install cocoapods -v 1.11.0
4837

49-
- uses: actions/cache@v2
38+
- uses: actions/cache@v4
5039
with:
5140
path: ./example/ios/Pods
5241
key: ${{ runner.os }}-expo-pods-${{ hashFiles('**/Podfile.lock') }}
@@ -82,19 +71,12 @@ jobs:
8271
if: ${{ false }}
8372

8473
steps:
85-
- uses: actions/checkout@v2
86-
87-
- name: Get yarn cache directory path
88-
id: yarn-cache-dir-path
89-
run: echo "::set-output name=dir::$(yarn cache dir)"
74+
- uses: actions/checkout@v4
9075

91-
- uses: actions/cache@v2
92-
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
76+
- uses: actions/setup-node@v4
9377
with:
94-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
95-
key: ${{ runner.os }}-expo-yarn-${{ hashFiles('**/yarn.lock') }}
96-
restore-keys: |
97-
${{ runner.os }}-expo-yarn-
78+
node-version: 20
79+
cache: 'yarn'
9880

9981
- name: Install Dependencies (Library)
10082
run: yarn install --frozen-lockfile
@@ -112,7 +94,7 @@ jobs:
11294
run: yarn expo prebuild --platform android
11395
working-directory: ./ExpoExample
11496

115-
- uses: actions/cache@v2
97+
- uses: actions/cache@v4
11698
with:
11799
path: |
118100
~/.gradle/caches

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- uses: actions/checkout@v2
2020
- uses: actions/setup-node@v3
2121
with:
22-
node-version: 18
22+
node-version: 20
2323

2424
- name: Install dependencies
2525
run: yarn install --frozen-lockfile

.github/workflows/run-tests.yml

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,12 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- uses: actions/setup-node@v3
14-
with:
15-
node-version: 16
16-
17-
- uses: actions/checkout@v2
18-
19-
- name: Get yarn cache directory path
20-
id: yarn-cache-dir-path
21-
run: echo "::set-output name=dir::$(yarn cache dir)"
13+
- uses: actions/checkout@v4
2214

23-
- uses: actions/cache@v3
24-
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
15+
- uses: actions/setup-node@v4
2516
with:
26-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
27-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
28-
restore-keys: |
29-
${{ runner.os }}-yarn-
17+
node-version: 20
18+
cache: 'yarn'
3019

3120
- name: Install Dependencies
3221
run: yarn install --frozen-lockfile

docs/ci/github-actions.md

Lines changed: 18 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -21,33 +21,27 @@ on: [pull_request]
2121

2222
jobs:
2323
run-visual-regression-ios:
24-
runs-on: macos-11
24+
runs-on: macos-14
2525

2626
steps:
27-
- uses: actions/checkout@v2
27+
- uses: actions/checkout@v4
2828

2929
- name: Get Runner Information
3030
run: /usr/bin/xcodebuild -version
3131

32-
- name: Get yarn cache directory path
33-
id: yarn-cache-dir-path
34-
run: echo "::set-output name=dir::$(yarn cache dir)"
35-
36-
- uses: actions/cache@v2
37-
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
32+
- name: Set up Node
33+
uses: actions/setup-node@v4
3834
with:
39-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
40-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
41-
restore-keys: |
42-
${{ runner.os }}-yarn-
35+
node-version: 20
36+
cache: 'yarn'
4337

4438
- name: Install Dependencies
4539
run: yarn install --frozen-lockfile
4640

4741
- name: Install CocoaPods
4842
run: gem install cocoapods -v 1.11.0
4943

50-
- uses: actions/cache@v2
44+
- uses: actions/cache@v4
5145
with:
5246
path: ./ios/Pods
5347
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
@@ -60,8 +54,8 @@ jobs:
6054

6155
- uses: futureware-tech/simulator-action@v1
6256
with:
63-
model: 'iPhone 13 Pro'
64-
os_version: '>=15.0'
57+
model: 'iPhone 15 Pro'
58+
os_version: '18.1'
6559

6660
- name: Run Owl Build
6761
run: yarn owl:build:ios
@@ -70,7 +64,7 @@ jobs:
7064
run: yarn owl:test:ios
7165

7266
- name: Store screenshots and report as artifacts
73-
uses: actions/upload-artifact@v2
67+
uses: actions/upload-artifact@v4
7468
if: failure()
7569
with:
7670
name: owl-results
@@ -86,27 +80,21 @@ on: [pull_request]
8680

8781
jobs:
8882
run-visual-regression-android:
89-
runs-on: macos-11
83+
runs-on: macos-14
9084

9185
steps:
92-
- uses: actions/checkout@v2
86+
- uses: actions/checkout@v4
9387

94-
- name: Get yarn cache directory path
95-
id: yarn-cache-dir-path
96-
run: echo "::set-output name=dir::$(yarn cache dir)"
97-
98-
- uses: actions/cache@v2
99-
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
88+
- name: Set up Node
89+
uses: actions/setup-node@v4
10090
with:
101-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
102-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
103-
restore-keys: |
104-
${{ runner.os }}-yarn-
91+
node-version: 20
92+
cache: 'yarn'
10593

10694
- name: Install Dependencies
10795
run: yarn install --frozen-lockfile
10896

109-
- uses: actions/cache@v2
97+
- uses: actions/cache@v4
11098
with:
11199
path: |
112100
~/.gradle/caches
@@ -138,7 +126,7 @@ jobs:
138126
run: yarn owl:test:android
139127

140128
- name: Store screenshots as artifacts
141-
uses: actions/upload-artifact@v2
129+
uses: actions/upload-artifact@v4
142130
if: failure()
143131
with:
144132
name: owl-screenshots
5.32 KB
Loading
5.39 KB
Loading
3.01 KB
Loading

example/.owl/baseline/ios/initial.png

5.32 KB
Loading
4.83 KB
Loading

0 commit comments

Comments
 (0)