[Snyk] Security upgrade rimraf from 3.0.2 to 4.0.0 #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: React Native E2E Tests (iOS) | |
on: | |
pull_request: | |
push: | |
branches: [trunk] | |
# Cancels all previous workflow runs for pull requests that have not completed. | |
concurrency: | |
# The concurrency group contains the workflow name and the branch name for pull requests | |
# or the commit hash for any other events. | |
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
runs-on: macos-11 | |
if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }} | |
strategy: | |
matrix: | |
xcode: ['13.2.1'] | |
device: ['iPhone 13'] | |
native-test-name: [gutenberg-editor-rendering] | |
steps: | |
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 | |
- name: Use desired version of NodeJS | |
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 | |
with: | |
node-version-file: '.nvmrc' | |
cache: npm | |
- run: npm ci | |
- name: Prepare build cache key | |
run: find package-lock.json packages/react-native-editor/ios packages/react-native-aztec/ios packages/react-native-bridge/ios -type f -print0 | sort -z | xargs -0 shasum | tee ios-checksums.txt | |
- name: Restore build cache | |
uses: actions/cache@6998d139ddd3e68c71e9e398d8e40b71a2f39812 # v3.2.5 | |
with: | |
path: | | |
packages/react-native-editor/ios/build/GutenbergDemo/Build/Products/Release-iphonesimulator/GutenbergDemo.app | |
packages/react-native-editor/ios/build/WDA | |
key: ${{ runner.os }}-ios-build-${{ matrix.xcode }}-${{ matrix.device }}-${{ hashFiles('ios-checksums.txt') }} | |
- name: Restore pods cache | |
uses: actions/cache@6998d139ddd3e68c71e9e398d8e40b71a2f39812 # v3.2.5 | |
with: | |
path: | | |
packages/react-native-editor/ios/Pods | |
~/Library/Caches/CocoaPods | |
~/.cocoapods/repos/trunk | |
packages/react-native-editor/ios/vendor | |
key: ${{ runner.os }}-pods-${{ hashFiles('packages/react-native-editor/ios/Gemfile.lock') }}-${{ hashFiles('packages/react-native-editor/ios/Podfile.lock') }}-${{ hashFiles('package-lock.json') }} | |
- name: Bundle iOS | |
run: npm run native test:e2e:bundle:ios | |
- name: Switch Xcode version to ${{ matrix.xcode }} | |
run: sudo xcode-select --switch /Applications/Xcode_${{ matrix.xcode }}.app | |
- name: Build (if needed) | |
run: test -e packages/react-native-editor/ios/build/GutenbergDemo/Build/Products/Release-iphonesimulator/GutenbergDemo.app/GutenbergDemo || npm run native test:e2e:build-app:ios | |
- name: Build Web Driver Agent (if needed) | |
run: test -d packages/react-native-editor/ios/build/WDA || npm run native test:e2e:build-wda | |
- name: Force update Launch Database to prevent issues when opening the Simulator app | |
run: /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -f /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer/Applications/Simulator.app | |
- name: Run iOS Device Tests | |
run: TEST_RN_PLATFORM=ios npm run native device-tests:local ${{ matrix.native-test-name }} | |
- name: Prepare build cache | |
run: | | |
rm packages/react-native-editor/ios/build/GutenbergDemo/Build/Products/Release-iphonesimulator/GutenbergDemo.app/main.jsbundle | |
rm -rf packages/react-native-editor/ios/build/GutenbergDemo/Build/Products/Release-iphonesimulator/GutenbergDemo.app/assets | |
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 | |
if: always() | |
with: | |
name: ios-screen-recordings | |
path: packages/react-native-editor/ios-screen-recordings | |
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 | |
if: always() | |
with: | |
name: appium-logs | |
path: packages/react-native-editor/appium-out.log |