Skip to content

Update actions/cache and actions/setup-node to v4 #187

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 21 additions & 36 deletions .github/workflows/demo-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,19 @@ on: [pull_request]

jobs:
run-visual-regression-ios:
runs-on: macos-11
runs-on: macos-14

steps:
- uses: actions/setup-node@v3
with:
node-version: 16
- uses: actions/checkout@v4

- uses: actions/checkout@v2
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'

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

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Install Dependencies (Library)
run: yarn install --frozen-lockfile
working-directory: ./
Expand All @@ -43,7 +32,7 @@ jobs:
- name: Install CocoaPods Gem
run: gem install cocoapods -v 1.11.0

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

- uses: futureware-tech/simulator-action@v1
- uses: futureware-tech/simulator-action@v4
with:
model: 'iPhone 13 Pro'
os_version: '>=15.0'
model: 'iPhone 15 Pro'
os_version: '18.1'
erase_before_boot: true
wait_for_boot: true
shutdown_after_job: true

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

- name: Store screenshots and report as artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: failure()
with:
name: owl-results
path: example/.owl

run-visual-regression-android:
runs-on: macos-11
runs-on: macos-14
if: ${{ false }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
- uses: actions/setup-node@v4
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
node-version: 20
cache: 'yarn'

- name: Install Dependencies (Library)
run: yarn install --frozen-lockfile
Expand All @@ -105,7 +90,7 @@ jobs:
run: yarn install --frozen-lockfile
working-directory: ./example

- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: |
~/.gradle/caches
Expand Down Expand Up @@ -139,7 +124,7 @@ jobs:
working-directory: ./example

- name: Store screenshots as artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: failure()
with:
name: owl-screenshots
Expand Down
38 changes: 10 additions & 28 deletions .github/workflows/demo-expo-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,16 @@ jobs:
if: ${{ false }}

steps:
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20
cache: 'yarn'

- uses: actions/checkout@v2
- uses: actions/checkout@v4

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

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-expo-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-expo-yarn-

- name: Install Dependencies (Library)
run: yarn install --frozen-lockfile
working-directory: ./
Expand All @@ -46,7 +35,7 @@ jobs:
- name: Install CocoaPods Gem
run: gem install cocoapods -v 1.11.0

- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: ./example/ios/Pods
key: ${{ runner.os }}-expo-pods-${{ hashFiles('**/Podfile.lock') }}
Expand Down Expand Up @@ -82,19 +71,12 @@ jobs:
if: ${{ false }}

steps:
- uses: actions/checkout@v2

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/checkout@v4

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

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

- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: |
~/.gradle/caches
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20

- name: Install dependencies
run: yarn install --frozen-lockfile
Expand Down
19 changes: 4 additions & 15 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/setup-node@v3
with:
node-version: 16

- uses: actions/checkout@v2

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/checkout@v4

- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
- uses: actions/setup-node@v4
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
node-version: 20
cache: 'yarn'

- name: Install Dependencies
run: yarn install --frozen-lockfile
Expand Down
48 changes: 18 additions & 30 deletions docs/ci/github-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,33 +21,27 @@ on: [pull_request]

jobs:
run-visual-regression-ios:
runs-on: macos-11
runs-on: macos-14

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

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

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
- name: Set up Node
uses: actions/setup-node@v4
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
node-version: 20
cache: 'yarn'

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

- name: Install CocoaPods
run: gem install cocoapods -v 1.11.0

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

- uses: futureware-tech/simulator-action@v1
with:
model: 'iPhone 13 Pro'
os_version: '>=15.0'
model: 'iPhone 15 Pro'
os_version: '18.1'

- name: Run Owl Build
run: yarn owl:build:ios
Expand All @@ -70,7 +64,7 @@ jobs:
run: yarn owl:test:ios

- name: Store screenshots and report as artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: failure()
with:
name: owl-results
Expand All @@ -86,27 +80,21 @@ on: [pull_request]

jobs:
run-visual-regression-android:
runs-on: macos-11
runs-on: macos-14

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
- name: Set up Node
uses: actions/setup-node@v4
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
node-version: 20
cache: 'yarn'

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

- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: |
~/.gradle/caches
Expand Down Expand Up @@ -138,7 +126,7 @@ jobs:
run: yarn owl:test:android

- name: Store screenshots as artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: failure()
with:
name: owl-screenshots
Expand Down
Binary file modified example/.owl/baseline/ios/after-reload.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified example/.owl/baseline/ios/custom-threshold.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified example/.owl/baseline/ios/entered-text.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified example/.owl/baseline/ios/initial.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified example/.owl/baseline/ios/long-press.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified example/.owl/baseline/ios/scroll-to-end.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified example/.owl/baseline/ios/scroll-to.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified example/.owl/baseline/ios/test-input.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions example/__tests__/App.owl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe('App.tsx', () => {
});

it('scrolls a bit and takes a screenshot', async () => {
await scrollTo('ScrollView', { y: 50 });
await scrollTo('ScrollView', {y: 50});

const screen = await takeScreenshot('scroll-to');

Expand Down Expand Up @@ -77,6 +77,6 @@ describe('App.tsx', () => {
const screen = await takeScreenshot('after-reload');

expect(screen).toMatchBaseline();
});
}, 100000);
});
});
13 changes: 13 additions & 0 deletions example/ios/OwlDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,7 @@
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION,
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
Expand All @@ -598,6 +599,10 @@
"-DFOLLY_MOBILE=1",
"-DFOLLY_USE_LIBCPP=1",
);
OTHER_LDFLAGS = (
"$(inherited)",
" ",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
};
Expand Down Expand Up @@ -639,6 +644,10 @@
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
"$(inherited)",
_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION,
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
Expand All @@ -662,6 +671,10 @@
"-DFOLLY_MOBILE=1",
"-DFOLLY_USE_LIBCPP=1",
);
OTHER_LDFLAGS = (
"$(inherited)",
" ",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
Expand Down
Loading
Loading