Skip to content
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
16 changes: 13 additions & 3 deletions .github/scripts/run-maestro.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ MAX_RERUN_ROUNDS="${MAX_RERUN_ROUNDS:-3}"
RERUN_REPORT_PREFIX="maestro-rerun"
export MAESTRO_DRIVER_STARTUP_TIMEOUT="${MAESTRO_DRIVER_STARTUP_TIMEOUT:-120000}"

if [ "$PLATFORM" = "android" ]; then
APP_ID="chat.rocket.android"
else
APP_ID="chat.rocket.ios"
fi

if ! command -v maestro >/dev/null 2>&1; then
echo "ERROR: maestro not found in PATH"
exit 2
Expand Down Expand Up @@ -65,12 +71,13 @@ printf ' %s\n' "${FLOW_FILES[@]}"

if [ "$PLATFORM" = "android" ]; then
adb shell settings put system show_touches 1 || true
adb install -r "app-experimental-release.apk" || true
adb shell monkey -p "chat.rocket.reactnative" -c android.intent.category.LAUNCHER 1 || true
adb install -r "app-official-release.apk" || true
Comment thread
diegolmello marked this conversation as resolved.
adb shell monkey -p "$APP_ID" -c android.intent.category.LAUNCHER 1 || true
sleep 6
adb shell am force-stop "chat.rocket.reactnative" || true
adb shell am force-stop "$APP_ID" || true

maestro test "${FLOW_FILES[@]}" \
-e APP_ID="$APP_ID" \
--exclude-tags=util \
--include-tags="test-${SHARD}" \
--exclude-tags=ios-only \
Expand All @@ -79,6 +86,7 @@ if [ "$PLATFORM" = "android" ]; then

else
maestro test "${FLOW_FILES[@]}" \
-e APP_ID="$APP_ID" \
--exclude-tags=util \
--include-tags="test-${SHARD}" \
--exclude-tags=android-only \
Expand Down Expand Up @@ -140,13 +148,15 @@ while [ ${#CURRENT_FAILS[@]} -gt 0 ] && [ "$ROUND" -le "$MAX_RERUN_ROUNDS" ]; do

if [ "$PLATFORM" = "android" ]; then
maestro test "${CURRENT_FAILS[@]}" \
-e APP_ID="$APP_ID" \
--exclude-tags=util \
--include-tags="test-${SHARD}" \
--exclude-tags=ios-only \
--format junit \
--output "$RPT" || true
else
maestro test "${CURRENT_FAILS[@]}" \
-e APP_ID="$APP_ID" \
--exclude-tags=util \
--include-tags="test-${SHARD}" \
--exclude-tags=android-only \
Expand Down
34 changes: 16 additions & 18 deletions .github/workflows/e2e-build-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,24 @@ name: E2E Build Android
on:
workflow_call:
secrets:
EXPERIMENTAL_KEYSTORE_BASE64:
KEYSTORE_OFFICIAL_BASE64:
required: true
EXPERIMENTAL_KEYSTORE_PASSWORD:
KEYSTORE_OFFICIAL_PASSWORD:
required: true
EXPERIMENTAL_KEY_ALIAS:
KEYSTORE_OFFICIAL_ALIAS:
required: true
EXPERIMENTAL_KEY_PASSWORD:
required: true
BUGSNAG_KEY:
BUGSNAG_KEY_OFFICIAL:
required: true

jobs:
android-build:
runs-on: ubuntu-latest

outputs:
artifact_name: Android Experimental APK
artifact_name: Android Official APK

steps:
- name: Checkout Repository
- name: Checkout Repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1

- name: Checkout and Setup Node
Expand Down Expand Up @@ -64,7 +62,7 @@ jobs:

- name: Decode Keystore
run: |
echo "${{ secrets.EXPERIMENTAL_KEYSTORE_BASE64 }}" | base64 -d > android/app/release.keystore
echo "${{ secrets.KEYSTORE_OFFICIAL_BASE64 }}" | base64 -d > android/app/release.keystore

- name: Set gradle.properties
working-directory: android
Expand All @@ -74,24 +72,24 @@ jobs:
echo -e "android.useAndroidX=true" >> ./gradle.properties
echo -e "android.enableJetifier=true" >> ./gradle.properties
echo -e "reactNativeArchitectures=x86_64" >> ./gradle.properties
echo -e "APPLICATION_ID=chat.rocket.reactnative" >> ./gradle.properties
echo -e "APPLICATION_ID=chat.rocket.android" >> ./gradle.properties
echo -e "newArchEnabled=true" >> ./gradle.properties
echo -e "hermesEnabled=true" >> ./gradle.properties
echo -e "VERSIONCODE=999999" >> ./gradle.properties
echo -e "KEYSTORE=release.keystore" >> ./gradle.properties
echo -e "KEYSTORE_PASSWORD=${{ secrets.EXPERIMENTAL_KEYSTORE_PASSWORD }}" >> ./gradle.properties
echo -e "KEY_ALIAS=${{ secrets.EXPERIMENTAL_KEY_ALIAS }}" >> ./gradle.properties
echo -e "KEY_PASSWORD=${{ secrets.EXPERIMENTAL_KEY_PASSWORD }}" >> ./gradle.properties
echo -e "BugsnagAPIKey=${{ secrets.BUGSNAG_KEY }}" >> ./gradle.properties
echo -e "KEYSTORE_PASSWORD=${{ secrets.KEYSTORE_OFFICIAL_PASSWORD }}" >> ./gradle.properties
echo -e "KEY_ALIAS=${{ secrets.KEYSTORE_OFFICIAL_ALIAS }}" >> ./gradle.properties
echo -e "KEY_PASSWORD=${{ secrets.KEYSTORE_OFFICIAL_PASSWORD }}" >> ./gradle.properties
echo -e "BugsnagAPIKey=${{ secrets.BUGSNAG_KEY_OFFICIAL }}" >> ./gradle.properties

- name: Build Android Release APK
working-directory: android
run: ./gradlew assembleExperimentalRelease --build-cache --parallel --max-workers=4 --no-daemon --stacktrace
run: ./gradlew assembleOfficialRelease --build-cache --parallel --max-workers=4 --no-daemon --stacktrace
env:
RUNNING_E2E_TESTS: true

- name: Upload APK
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: Android Experimental APK
path: android/app/build/outputs/apk/experimental/release/app-experimental-release.apk
name: Android Official APK
path: android/app/build/outputs/apk/official/release/app-official-release.apk
9 changes: 6 additions & 3 deletions .github/workflows/e2e-build-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,20 @@ jobs:
run: |
echo ${{ secrets.APP_STORE_CONNECT_API_KEY_BASE64 }} | base64 --decode > ./ios/fastlane/app_store_connect_api_key.p8

- name: Set bugsnag key
- name: Set bugsnag key and IS_OFFICIAL
run: |
cd ios
/usr/libexec/PlistBuddy -c "Set :bugsnag:apiKey ${{ secrets.BUGSNAG_KEY}}" ./RocketChatRN/Info.plist
/usr/libexec/PlistBuddy -c "Set :bugsnag:apiKey ${{ secrets.BUGSNAG_KEY}}" ./ShareRocketChatRN/Info.plist
/usr/libexec/PlistBuddy -c "Set IS_OFFICIAL YES" ./RocketChatRN/Info.plist
/usr/libexec/PlistBuddy -c "Set IS_OFFICIAL YES" ./ShareRocketChatRN/Info.plist
/usr/libexec/PlistBuddy -c "Set IS_OFFICIAL YES" ./NotificationService/Info.plist

- name: Build iOS app
run: |
cd ios
export RUNNING_E2E_TESTS=true
bundle exec fastlane ios build_experimental_simulator \
bundle exec fastlane ios build_official_simulator \
disable_xcpretty:false \
skip_package_ipa:true \
skip_archive:true
Expand All @@ -104,4 +107,4 @@ jobs:
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: ios-simulator-app
path: ${{ steps.find_xcarchive.outputs.archive_path }}/Products/Applications/Rocket.Chat Experimental.app
path: ${{ steps.find_xcarchive.outputs.archive_path }}/Products/Applications/Rocket.Chat.app
Comment thread
coderabbitai[bot] marked this conversation as resolved.
2 changes: 1 addition & 1 deletion .github/workflows/maestro-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Download APK
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: Android Experimental APK
name: Android Official APK

- name: Setup E2E Account
uses: ./.github/actions/e2e-account
Expand Down
2 changes: 1 addition & 1 deletion .maestro/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
appId: chat.rocket.reactnative
appId: ${APP_ID}
flows:
- tests/**
excludeTags:
Expand Down
2 changes: 1 addition & 1 deletion .maestro/helpers/create-account.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
appId: chat.rocket.reactnative
appId: ${APP_ID}
name: Create Account
tags:
- 'util'
Expand Down
2 changes: 1 addition & 1 deletion .maestro/helpers/erase-text.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
appId: chat.rocket.reactnative
appId: ${APP_ID}
name: Erase Text
tags:
- 'util'
Expand Down
2 changes: 1 addition & 1 deletion .maestro/helpers/go-back.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
appId: chat.rocket.reactnative
appId: ${APP_ID}
name: Go back
tags:
- 'util'
Expand Down
2 changes: 1 addition & 1 deletion .maestro/helpers/hide-keyboard.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
appId: chat.rocket.reactnative
appId: ${APP_ID}
name: Hide Keyboard
tags:
- 'util'
Expand Down
2 changes: 1 addition & 1 deletion .maestro/helpers/launch-app.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
appId: chat.rocket.reactnative
appId: ${APP_ID}
name: Launch app
tags:
- 'util'
Expand Down
6 changes: 3 additions & 3 deletions .maestro/helpers/login-with-deeplink.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
appId: chat.rocket.reactnative
appId: ${APP_ID}
name: Login with Deeplink
tags:
- 'util'

---
- stopApp: chat.rocket.reactnative
- stopApp: ${APP_ID}
- runFlow:
when:
true: CLEAR_STATE
commands:
- clearState: chat.rocket.reactnative
- clearState: ${APP_ID}
- setPermissions:
permissions:
all: allow
Expand Down
2 changes: 1 addition & 1 deletion .maestro/helpers/login.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
appId: chat.rocket.reactnative
appId: ${APP_ID}
name: Login
tags:
- 'util'
Expand Down
2 changes: 1 addition & 1 deletion .maestro/helpers/logout.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
appId: chat.rocket.reactnative
appId: ${APP_ID}
name: Logout
tags:
- 'util'
Expand Down
2 changes: 1 addition & 1 deletion .maestro/helpers/navigate-to-login.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
appId: chat.rocket.reactnative
appId: ${APP_ID}
name: Navigate to login
tags:
- 'util'
Expand Down
2 changes: 1 addition & 1 deletion .maestro/helpers/navigate-to-recent-room.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
appId: chat.rocket.reactnative
appId: ${APP_ID}
name: Navigate to recent room
tags:
- 'util'
Expand Down
2 changes: 1 addition & 1 deletion .maestro/helpers/navigate-to-register.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
appId: chat.rocket.reactnative
appId: ${APP_ID}
name: Navigate to register
tags:
- 'util'
Expand Down
2 changes: 1 addition & 1 deletion .maestro/helpers/navigate-to-room-action.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
appId: chat.rocket.reactnative
appId: ${APP_ID}
name: Navigate to room action
tags:
- 'util'
Expand Down
2 changes: 1 addition & 1 deletion .maestro/helpers/navigate-to-room.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
appId: chat.rocket.reactnative
appId: ${APP_ID}
name: Navigate to room
tags:
- 'util'
Expand Down
2 changes: 1 addition & 1 deletion .maestro/helpers/navigate-to-workspace.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
appId: chat.rocket.reactnative
appId: ${APP_ID}
name: Navigate to workspace
tags:
- 'util'
Expand Down
2 changes: 1 addition & 1 deletion .maestro/helpers/open-deeplink.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
appId: chat.rocket.reactnative
appId: ${APP_ID}
name: Open Deep Link
tags:
- 'util'
Expand Down
2 changes: 1 addition & 1 deletion .maestro/helpers/search-and-navigate-room.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
appId: chat.rocket.reactnative
appId: ${APP_ID}
name: Search and navigate room
tags:
- 'util'
Expand Down
2 changes: 1 addition & 1 deletion .maestro/helpers/search-room.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
appId: chat.rocket.reactnative
appId: ${APP_ID}
name: Search room
tags:
- 'util'
Expand Down
2 changes: 1 addition & 1 deletion .maestro/helpers/send-message.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
appId: chat.rocket.reactnative
appId: ${APP_ID}
name: Send message
tags:
- 'util'
Expand Down
2 changes: 1 addition & 1 deletion .maestro/helpers/setup.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
appId: chat.rocket.reactnative
appId: ${APP_ID}
tags:
- 'util'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
appId: chat.rocket.reactnative
appId: ${APP_ID}
name: Toasts and Dialogs
onFlowStart:
- runFlow: '../../helpers/setup.yaml'
Expand Down
2 changes: 1 addition & 1 deletion .maestro/tests/assorted/accessibility-and-appearance.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
appId: chat.rocket.reactnative
appId: ${APP_ID}
name: Accessibility and Appearance
onFlowStart:
- runFlow: '../../helpers/setup.yaml'
Expand Down
2 changes: 1 addition & 1 deletion .maestro/tests/assorted/broadcast.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
appId: chat.rocket.reactnative
appId: ${APP_ID}
name: Broadcast
onFlowStart:
- runFlow: '../../helpers/setup.yaml'
Expand Down
2 changes: 1 addition & 1 deletion .maestro/tests/assorted/change-avatar.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
appId: chat.rocket.reactnative
appId: ${APP_ID}
name: Change Avatar
onFlowStart:
- runFlow: '../../helpers/setup.yaml'
Expand Down
2 changes: 1 addition & 1 deletion .maestro/tests/assorted/changeserver.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
appId: chat.rocket.reactnative
appId: ${APP_ID}
name: Change Server
onFlowStart:
- runFlow: '../../helpers/setup.yaml'
Expand Down
Loading
Loading