Skip to content

Commit 689fa15

Browse files
Merge branch 'release/5.237.0'
2 parents e28854f + 67fd009 commit 689fa15

File tree

720 files changed

+10018
-5087
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

720 files changed

+10018
-5087
lines changed

.github/actions/assign-release-task/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ inputs:
1313
username:
1414
description: 'The Github username to search for'
1515
required: true
16+
outputs:
17+
task_id:
18+
description: 'The Asana task ID that was found and assigned'
1619
runs:
1720
using: 'composite'
1821
steps:
@@ -36,6 +39,7 @@ runs:
3639
exit 1
3740
else
3841
echo "Task ID for the task named '$task_name': $task_id"
42+
echo "task_id=$task_id" >> $GITHUB_OUTPUT
3943
fi
4044
4145
asana_user_id=$(grep -E "^$username: " .github/actions/assign-release-task/github_asana_mapping.yml | awk -F': ' '{print $2}' | tr -d '"')

.github/workflows/release_create_tag.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
mattermost-token: ${{ secrets.MM_AUTH_TOKEN }}
5555
mattermost-team-id: ${{ secrets.MM_TEAM_ID }}
5656
mattermost-channel-name: ${{ vars.MM_RELEASE_NOTIFY_CHANNEL }}
57-
mattermost-message: ${{env.emoji_start}} Release ${{ github.event.inputs.app-version }}. Tag created.
57+
mattermost-message: ${{env.emoji_info}} Release ${{ github.event.inputs.app-version }}. Tag created https://github.com/duckduckgo/Android/releases/tag/${{ github.event.inputs.app-version }}
5858
action: 'send-mattermost-message'
5959

6060
- name: Create Asana task when workflow failed

.github/workflows/release_create_task.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,22 @@ jobs:
6363
project_gid: ${{ vars.GH_ANDROID_RELEASE_BOARD_PROJECT_ID }}
6464
username: ${{ github.actor }}
6565

66+
- name: Get Asana Task Permalink
67+
id: get-task-permalink
68+
uses: duckduckgo/[email protected]
69+
with:
70+
asana-pat: ${{ secrets.ASANA_ACCESS_TOKEN }}
71+
asana-task-id: ${{ steps.assign-release-task.outputs.task_id }}
72+
action: 'get-asana-task-permalink'
73+
6674
- name: Notify Mattermost of Task created
6775
id: send-mm-task-created
6876
uses: duckduckgo/[email protected]
6977
with:
7078
mattermost-token: ${{ secrets.MM_AUTH_TOKEN }}
7179
mattermost-team-id: ${{ secrets.MM_TEAM_ID }}
7280
mattermost-channel-name: ${{ vars.MM_RELEASE_NOTIFY_CHANNEL }}
73-
mattermost-message: ${{env.emoji_info}} Release ${{ github.event.inputs.app-version }} Asana task successfully created. See https://app.asana.com/0/1184843898389381/1205105962934096
81+
mattermost-message: ${{env.emoji_info}} Release ${{ github.event.inputs.app-version }}. Task created successfully ${{ steps.get-task-permalink.outputs.asanaTaskPermalink }}
7482
action: 'send-mattermost-message'
7583

7684
- name: Create Asana task when workflow failed

.github/workflows/release_production.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

.github/workflows/release_tests.yml

Lines changed: 118 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
1-
name: Run Release Tests in Maestro
1+
name: Release - Run E2E Maestro Tests
22

33
on:
44
workflow_dispatch:
55
inputs:
66
app-version:
7-
description: 'App Version for Release'
7+
description: 'App Version for Testing'
88
required: true
99
default: 'PLACEHOLDER'
10+
test-tag:
11+
description: 'Maestro Tests tag to include'
12+
required: true
13+
default: 'releaseTest'
1014

1115
env:
1216
ASANA_PAT: ${{ secrets.ASANA_ACCESS_TOKEN }}
13-
14-
concurrency:
15-
group: ${{ github.workflow }}-${{ github.ref }}
16-
cancel-in-progress: true
17+
emoji_info: ":information_source:" # ℹ️
18+
emoji_success: ":white_check_mark:" #
19+
emoji_failure: ":x:" #
1720

1821
jobs:
1922
run-release-tests:
20-
name: Run Release tests of tag version in Maestro
21-
runs-on: ubuntu-24.04
22-
23+
name: Create and Push git tag for version
24+
runs-on: ubuntu-latest
2325
steps:
2426
- name: Checkout repository
2527
uses: actions/checkout@v4
@@ -68,21 +70,122 @@ jobs:
6870
mattermost-token: ${{ secrets.MM_AUTH_TOKEN }}
6971
mattermost-team-id: ${{ secrets.MM_TEAM_ID }}
7072
mattermost-channel-name: ${{ vars.MM_RELEASE_NOTIFY_CHANNEL }}
71-
mattermost-message: Starting to run Release tests for version ${{ github.event.inputs.app-version }} successfully created. See https://app.asana.com/0/1184843898389381/1205105962934096
73+
mattermost-message: ${{env.emoji_info}} Release ${{ github.event.inputs.app-version }}. Running Maestro tests for tag ${{ github.event.inputs.test-tag }} https://github.com/duckduckgo/Android/actions/runs/${{ github.run_id }}
7274
action: 'send-mattermost-message'
7375

74-
- name: Release tests flows
75-
uses: mobile-dev-inc/[email protected]
76+
- name: Maestro tests flows
77+
id: release-tests
78+
uses: mobile-dev-inc/[email protected]
7679
timeout-minutes: 120
7780
with:
7881
api-key: ${{ secrets.ROBIN_API_KEY }}
7982
project-id: ${{ vars.ROBIN_ANDROID_PROJECT_ID }}
80-
name: releaseTest_${{ github.sha }}
8183
timeout: ${{ vars.ROBIN_TIMEOUT_MINUTES }}
82-
app-file: apk/release.apk
8384
android-api-level: 30
8485
workspace: .maestro
85-
include-tags: releaseTest
86+
include-tags: ${{ github.event.inputs.test-tag }}
87+
88+
- name: Analyze Maestro Flow Results
89+
id: analyze-flow-results
90+
if: always()
91+
run: |
92+
echo "Console URL: ${{ steps.release-tests.outputs.MAESTRO_CLOUD_CONSOLE_URL }}"
93+
echo "Upload Status: ${{ steps.release-tests.outputs.MAESTRO_CLOUD_UPLOAD_STATUS }}"
94+
echo "App Binary ID: ${{ steps.release-tests.outputs.MAESTRO_CLOUD_APP_BINARY_ID }}"
95+
96+
flow_results_json='${{ steps.release-tests.outputs.MAESTRO_CLOUD_FLOW_RESULTS }}'
97+
echo "Raw Flow Results JSON: $flow_results_json"
98+
99+
# Default to success, change if issues are found
100+
final_status="success"
101+
102+
# Check for empty or invalid JSON (though Maestro action should provide valid JSON)
103+
if ! echo "$flow_results_json" | jq -e . > /dev/null 2>&1; then
104+
echo "::warning::MAESTRO_CLOUD_FLOW_RESULTS is not valid JSON or is empty."
105+
final_status="unknown_format"
106+
else
107+
# Check for any flow with status "ERROR"
108+
if echo "$flow_results_json" | jq -e '.[] | select(.status=="ERROR")' > /dev/null; then
109+
echo "::error::At least one Maestro flow has status: ERROR."
110+
final_status="failure"
111+
fi
112+
113+
# Check for any flow with status "CANCELED"
114+
# You might decide if CANCELED flows also mean the overall status is a failure for your release
115+
if echo "$flow_results_json" | jq -e '.[] | select(.status=="CANCELED")' > /dev/null; then
116+
echo "::warning::At least one Maestro flow has status: CANCELED."
117+
# If any canceled flow makes the whole thing a failure:
118+
if [ "$final_status" != "failure" ]; then # Don't override if already a critical failure
119+
final_status="canceled_present" # Or treat as "failure" if preferred
120+
fi
121+
fi
122+
123+
# If after all checks, final_status is still "success", it means no "ERROR" or "CANCELED"
124+
if [ "$final_status" == "success" ]; then
125+
# Additional check: ensure there's at least one flow and it's not empty array if that's a concern
126+
if echo "$flow_results_json" | jq -e '. | length > 0' > /dev/null; then
127+
echo "All flows appear to be successful (no ERROR or CANCELED statuses found that are treated as errors)."
128+
else
129+
echo "::warning::MAESTRO_CLOUD_FLOW_RESULTS is an empty array. No flows reported."
130+
final_status="empty_results" # Or "success" if empty results are acceptable
131+
fi
132+
fi
133+
fi
134+
135+
echo "Final determined status: $final_status"
136+
echo "flow_summary_status=$final_status" >> $GITHUB_OUTPUT
137+
138+
- name: Access Outputs (for debugging)
139+
if: always()
140+
run: |
141+
echo "Console URL: ${{ steps.release-tests.outputs.MAESTRO_CLOUD_CONSOLE_URL }}"
142+
echo "Flow Results (JSON): ${{ steps.release-tests.outputs.MAESTRO_CLOUD_FLOW_RESULTS }}"
143+
echo "Release Tests Step Conclusion: ${{ steps.release-tests.conclusion }}" # From Maestro action itself
144+
echo "Analyzed Flow Summary Status: ${{ steps.analyze-flow-results.outputs.flow_summary_status }}" # From our script
145+
146+
- name: Notify Mattermost - Maestro Tests ALL SUCCEEDED
147+
# Condition 1: Our script says success
148+
# Condition 2: The Maestro action itself also reported overall success
149+
if: always() && steps.analyze-flow-results.outputs.flow_summary_status == 'success' && steps.release-tests.conclusion == 'success'
150+
uses: duckduckgo/[email protected]
151+
with:
152+
action: 'send-mattermost-message'
153+
mattermost-token: ${{ secrets.MM_AUTH_TOKEN }}
154+
mattermost-team-id: ${{ secrets.MM_TEAM_ID }}
155+
mattermost-channel-name: ${{ vars.MM_RELEASE_NOTIFY_CHANNEL }}
156+
mattermost-message: |
157+
${{env.emoji_success}} Release ${{ github.event.inputs.app-version }}: Tests for for tag ${{ github.event.inputs.test-tag }} PASSED successfully.
158+
Console: ${{ steps.release-tests.outputs.MAESTRO_CLOUD_CONSOLE_URL }}
159+
Flow Results: json ${{ steps.release-tests.outputs.MAESTRO_CLOUD_FLOW_RESULTS }}
160+
161+
- name: Notify Mattermost - Maestro Tests FAILURES or ISSUES DETECTED
162+
# Condition: Our script detected 'failure' OR the Maestro action itself reported failure
163+
if: always() && (steps.analyze-flow-results.outputs.flow_summary_status == 'failure' || steps.release-tests.conclusion == 'failure')
164+
uses: duckduckgo/[email protected]
165+
with:
166+
action: 'send-mattermost-message'
167+
mattermost-token: ${{ secrets.MM_AUTH_TOKEN }}
168+
mattermost-team-id: ${{ secrets.MM_TEAM_ID }}
169+
mattermost-channel-name: ${{ vars.MM_RELEASE_NOTIFY_CHANNEL }}
170+
mattermost-message: |
171+
${{env.emoji_failure}} Release ${{ github.event.inputs.app-version }}: Tests for tag ${{ github.event.inputs.test-tag }} FAILED or encountered issues.
172+
Console: ${{ steps.release-tests.outputs.MAESTRO_CLOUD_CONSOLE_URL }}
173+
Flow Results: json ${{ steps.release-tests.outputs.MAESTRO_CLOUD_FLOW_RESULTS }}
174+
175+
- name: Notify Mattermost - Maestro Tests CANCELED Flows Present (Informational or Warning)
176+
# Condition: Our script detected 'canceled_present' AND no critical 'failure' was found
177+
# AND Maestro action itself didn't mark the whole run as a 'failure'
178+
if: always() && steps.analyze-flow-results.outputs.flow_summary_status == 'canceled_present' && steps.release-tests.conclusion != 'failure'
179+
uses: duckduckgo/[email protected]
180+
with:
181+
action: 'send-mattermost-message'
182+
mattermost-token: ${{ secrets.MM_AUTH_TOKEN }}
183+
mattermost-team-id: ${{ secrets.MM_TEAM_ID }}
184+
mattermost-channel-name: ${{ vars.MM_RELEASE_NOTIFY_CHANNEL }}
185+
mattermost-message: |
186+
:warning: Release ${{ github.event.inputs.app-version }}: Some tests for tag ${{ github.event.inputs.test-tag }} were CANCELED. Please review.
187+
Console: ${{ steps.release-tests.outputs.MAESTRO_CLOUD_CONSOLE_URL }}
188+
Flow Results: json ${{ steps.release-tests.outputs.MAESTRO_CLOUD_FLOW_RESULTS }}
86189
87190
- name: Create Asana task when workflow failed
88191
if: ${{ failure() }}
@@ -95,14 +198,3 @@ jobs:
95198
asana-task-name: GH Workflow Failure - Tag Android Release (Robin)
96199
asana-task-description: Run Release Tests in Maestro has failed. See https://github.com/duckduckgo/Android/actions/runs/${{ github.run_id }}
97200
action: 'create-asana-task'
98-
99-
- name: Notify Mattermost when workflow failed
100-
if: ${{ failure() }}
101-
id: send-mm-message-error
102-
uses: duckduckgo/[email protected]
103-
with:
104-
mattermost-token: ${{ secrets.MM_AUTH_TOKEN }}
105-
mattermost-team-id: ${{ secrets.MM_TEAM_ID }}
106-
mattermost-channel-name: ${{ vars.MM_RELEASE_NOTIFY_CHANNEL }}
107-
asana-task-description: Run Release Tests in Maestro has failed. See https://github.com/duckduckgo/Android/actions/runs/${{ github.run_id }}
108-
action: 'send-mattermost-message'

.github/workflows/release_upload_play_store.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ env:
1212
GH_TOKEN: ${{ secrets.GT_DAXMOBILE }}
1313
GOOGLE_APPLICATION_CREDENTIALS: '#{ENV["HOME"]}/jenkins_static/com.duckduckgo.mobile.android/ddg-upload-firebase.json'
1414
emoji_info: ":information_source:" # ℹ️
15+
emoji_end: ":flight_arrival:" # 🛫
1516

1617
jobs:
1718
release-production:
@@ -91,7 +92,7 @@ jobs:
9192
mattermost-token: ${{ secrets.MM_AUTH_TOKEN }}
9293
mattermost-team-id: ${{ secrets.MM_TEAM_ID }}
9394
mattermost-channel-name: ${{ vars.MM_RELEASE_NOTIFY_CHANNEL }}
94-
mattermost-message: ${{env.emoji_start}} Release ${{ github.event.inputs.app-version }}. AAB uploaded to Play Store. See https://play.google.com/console/u/0/developers/5949020878215944484/app/4974643806384870294/releases/overview
95+
mattermost-message: ${{env.emoji_start}} Release ${{ github.event.inputs.app-version }} uploaded to Play Store. See https://play.google.com/console/u/0/developers/5949020878215944484/app/4974643806384870294/releases/overview
9596
action: 'send-mattermost-message'
9697

9798
- name: Upload Universal APK to Github
@@ -106,7 +107,17 @@ jobs:
106107
mattermost-token: ${{ secrets.MM_AUTH_TOKEN }}
107108
mattermost-team-id: ${{ secrets.MM_TEAM_ID }}
108109
mattermost-channel-name: ${{ vars.MM_RELEASE_NOTIFY_CHANNEL }}
109-
mattermost-message: ${{env.emoji_start}} Release ${{ github.event.inputs.app-version }}. Universal APK uploaded to Github. See https://github.com/duckduckgo/Android/releases
110+
mattermost-message: ${{env.emoji_start}} Release ${{ github.event.inputs.app-version }} uploaded to Github https://github.com/duckduckgo/Android/releases/tag/${{ github.event.inputs.app-version }}
111+
action: 'send-mattermost-message'
112+
113+
- name: Notify Mattermost of Release completed
114+
id: send-mm-message-gh-upload
115+
uses: duckduckgo/[email protected]
116+
with:
117+
mattermost-token: ${{ secrets.MM_AUTH_TOKEN }}
118+
mattermost-team-id: ${{ secrets.MM_TEAM_ID }}
119+
mattermost-channel-name: ${{ vars.MM_RELEASE_NOTIFY_CHANNEL }}
120+
mattermost-message: ${{env.emoji_end}} Release ${{ github.event.inputs.app-version }} completed successfully and is now in review.
110121
action: 'send-mattermost-message'
111122

112123
- name: Create Asana task when workflow failed

.github/workflows/test_workflow.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Test - Workflow for Testing
2+
3+
on:
4+
workflow_dispatch:
5+
6+
inputs:
7+
ref:
8+
description: 'This is an example of an input'
9+
required: true
10+
11+
env:
12+
ASANA_PAT: ${{ secrets.ASANA_ACCESS_TOKEN }}
13+
GH_TOKEN: ${{ secrets.GT_DAXMOBILE }}
14+
15+
jobs:
16+
test-workflow:
17+
runs-on: ubuntu-latest
18+
name: Add here whatever steps you want to test
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
with:
24+
submodules: recursive
25+
token: ${{ secrets.GT_DAXMOBILE }}
26+
ref: ${{ github.event.inputs.ref }}

.maestro/ad_click_detection_flows/10_-_m.js_bing-provided_ad_domain_provided_but_incorrect_dsl_not_needed.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ tags:
1313
- inputText: "https://www.search-company.site/#ad-id-10"
1414
- pressKey: Enter
1515

16-
- tapOn:
17-
id: "com.duckduckgo.mobile.android:id/fireIconMenu"
16+
- runFlow: ../shared/browser_screen/click_on_fire_button.yaml
1817
- tapOn:
1918
text: "Cancel"
2019
- assertVisible:
@@ -23,8 +22,7 @@ tags:
2322
id: "ad-id-10"
2423
- assertVisible:
2524
text: "Publisher site"
26-
- tapOn:
27-
id: "com.duckduckgo.mobile.android:id/omnibarIconContainer"
25+
- runFlow: ../shared/browser_screen/click_on_privacy_shield.yaml
2826
- assertVisible:
2927
text: "View Tracker Companies"
3028
- tapOn:

.maestro/ad_click_detection_flows/11_-_y.js_bing-provided_ad_domain_provided_but_it's_not_a_domain_i.e.,_abcedf_u3_not_needed.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ tags:
1313
- inputText: "https://www.search-company.site/#ad-id-11"
1414
- pressKey: Enter
1515

16-
- tapOn:
17-
id: "com.duckduckgo.mobile.android:id/fireIconMenu"
16+
- runFlow: ../shared/browser_screen/click_on_fire_button.yaml
1817
- tapOn:
1918
text: "Cancel"
2019
- assertVisible:
@@ -23,8 +22,7 @@ tags:
2322
id: "ad-id-11"
2423
- assertVisible:
2524
text: "Publisher site"
26-
- tapOn:
27-
id: "com.duckduckgo.mobile.android:id/omnibarIconContainer"
25+
- runFlow: ../shared/browser_screen/click_on_privacy_shield.yaml
2826
- assertVisible:
2927
text: "View Tracker Companies"
3028
- tapOn:

.maestro/ad_click_detection_flows/12_-_m.js_bing-provided_ad_domain_provided_but_it's_not_a_domain_i.e.,_abcedf__dsl_not_needed.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ tags:
1313
- inputText: "https://www.search-company.site/#ad-id-12"
1414
- pressKey: Enter
1515

16-
- tapOn:
17-
id: "com.duckduckgo.mobile.android:id/fireIconMenu"
16+
- runFlow: ../shared/browser_screen/click_on_fire_button.yaml
1817
- tapOn:
1918
text: "Cancel"
2019
- assertVisible:
@@ -23,8 +22,7 @@ tags:
2322
id: "ad-id-12"
2423
- assertVisible:
2524
text: "Publisher site"
26-
- tapOn:
27-
id: "com.duckduckgo.mobile.android:id/omnibarIconContainer"
25+
- runFlow: ../shared/browser_screen/click_on_privacy_shield.yaml
2826
- assertVisible:
2927
text: "View Tracker Companies"
3028
- tapOn:

0 commit comments

Comments
 (0)