-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'trunk' into release/1.110.1
# Conflicts: # .buildkite/commands/build-ios.sh # .buildkite/pipeline.yml # gutenberg # ios-xcframework/Podfile.lock # package-lock.json # package.json
- Loading branch information
Showing
24 changed files
with
524 additions
and
335 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash -eu | ||
|
||
echo "--- :npm: Set up Node dependencies" | ||
npm ci --unsafe-perm --prefer-offline --no-audit --no-progress | ||
|
||
echo '--- :android: Set env var for Android E2E testing' | ||
set -x | ||
export TEST_RN_PLATFORM=android | ||
export TEST_ENV=sauce | ||
set +x | ||
|
||
echo '--- :react: Build Android bundle for E2E testing' | ||
npm run test:e2e:bundle:android | ||
|
||
echo '--- :react: Build Android app for E2E testing' | ||
npm run core test:e2e:build-app:android | ||
|
||
WORK_DIR=$(pwd) | ||
ARTIFACT_PATH="$WORK_DIR/gutenberg/packages/react-native-editor/android/app/build/outputs/apk/debug/app-debug.apk" | ||
|
||
if [[ ! -f $ARTIFACT_PATH ]]; then | ||
echo '+++ APK not found at expected path' | ||
echo "Expected path: $ARTIFACT_PATH" | ||
exit 1 | ||
fi | ||
|
||
echo '--- :saucelabs: Upload app artifact to SauceLabs' | ||
SAUCE_FILENAME=${BUILDKITE_BRANCH//[\/]/-} | ||
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" \ | ||
--location \ | ||
--request POST 'https://api.us-west-1.saucelabs.com/v1/storage/upload' \ | ||
--form "payload=@\"$ARTIFACT_PATH\"" \ | ||
--form "name=Gutenberg-$SAUCE_FILENAME.apk" \ | ||
--form 'description="Gutenberg"' |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
#!/bin/bash -eu | ||
|
||
MODE="full" | ||
INPUT="${1-}" | ||
while [ "$INPUT" != "" ]; do | ||
case $INPUT in | ||
--canary ) | ||
MODE="canary" | ||
;; | ||
* ) | ||
echo "Unknown option: $1" | ||
exit 1 | ||
;; | ||
esac | ||
shift | ||
INPUT="${1-}" | ||
done | ||
|
||
echo '--- :node: Set up Node depenendencies' | ||
npm ci --prefer-offline --no-audit --ignore-scripts | ||
npm ci --prefix gutenberg --prefer-offline --no-audit | ||
|
||
echo '--- :ios: Set env var for Android E2E testing' | ||
set -x | ||
export TEST_RN_PLATFORM=android | ||
export TEST_ENV=sauce | ||
export JEST_JUNIT_OUTPUT_FILE="reports/test-results/android-test-results.xml" | ||
# This is a relic of the CircleCI setup. | ||
# It should be removed once the migration to Buildkite is completed. | ||
export CIRCLE_BRANCH=${BUILDKITE_BRANCH} | ||
set +x | ||
|
||
if [ "$MODE" == 'canary' ]; then | ||
SECTION='--- :saucelabs: Test Android Canary Pages' | ||
TESTS_CMD='device-tests-canary' | ||
else | ||
SECTION='--- :saucelabs: Test Android' | ||
TESTS_CMD='device-tests' | ||
fi | ||
|
||
set +e | ||
echo "$SECTION" | ||
npm run "$TESTS_CMD" | ||
TESTS_EXIT_CODE=$? | ||
set -e | ||
|
||
REPORT_SECTION_NAME='🚦 Report Tests Status' | ||
if [[ $TESTS_EXIT_CODE -eq 0 ]]; then | ||
echo "--- $REPORT_SECTION_NAME" | ||
echo "npm run $TESTS_CMD passed. 🎉" | ||
else | ||
echo "+++ $REPORT_SECTION_NAME" | ||
echo "npm run $TESTS_CMD failed." | ||
|
||
if ! command -v ruby ; then | ||
echo 'Skipping test reporting because Ruby is not available on this machine.' | ||
exit $TESTS_EXIT_CODE | ||
fi | ||
|
||
echo "For more details about the failed tests, check the Buildkite annotation, the logs under the '$SECTION' section and the tests results in the artifacts tab." | ||
|
||
if [[ $BUILDKITE_BRANCH == trunk ]]; then | ||
annotate_test_failures "$JEST_JUNIT_OUTPUT_FILE" --slack "build-and-ship" | ||
else | ||
annotate_test_failures "$JEST_JUNIT_OUTPUT_FILE" | ||
fi | ||
|
||
exit $TESTS_EXIT_CODE | ||
fi |
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
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
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
Oops, something went wrong.