-
Notifications
You must be signed in to change notification settings - Fork 927
95 lines (81 loc) · 3.3 KB
/
sync-critical-path.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: Sync Feature Critical Path End-to-End tests
on:
schedule:
- cron: '0 5 * * *' # run at 5 AM UTC
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
instrumentation_tests:
runs-on: ubuntu-latest
name: Sync Feature Critical Path End-to-End tests
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
- name: Create test account for Sync and return the recovery code
uses: duckduckgo/sync_crypto/action@main
id: sync-recovery-code
with:
debug: true
no-teardown: false # Turn this to true so the account is not deleted after the test
- name: Create folder
if: always()
run: mkdir apk
- name: Decode keys
uses: davidSchuppa/base64Secret-toFile-action@v2
with:
secret: ${{ secrets.FAKE_RELEASE_PROPERTIES }}
fileName: ddg_android_build.properties
destination-path: $HOME/jenkins_static/com.duckduckgo.mobile.android/
- name: Decode key file
uses: davidSchuppa/base64Secret-toFile-action@v2
with:
secret: ${{ secrets.FAKE_RELEASE_KEY }}
fileName: android
destination-path: $HOME/jenkins_static/com.duckduckgo.mobile.android/
- name: Assemble internal release APK
uses: gradle/gradle-build-action@v2
with:
arguments: assembleInternalRelease -Pforce-default-variant -x lint
- name: Move APK to new folder
if: always()
run: find . -name "*.apk" -exec mv '{}' apk/release.apk \;
- name: Sync Flows
uses: mobile-dev-inc/action-maestro-cloud@v1.6.0
with:
api-key: ${{ secrets.MOBILE_DEV_API_KEY }}
name: ${{ github.sha }}
app-file: apk/release.apk
android-api-level: 30
workspace: .maestro
include-tags: syncCriticalPathTest
env: |
CODE=${{ steps.sync-recovery-code.outputs.recovery-code }}
- name: Create Asana task when workflow failed
if: ${{ failure() }}
id: create-failure-task
uses: duckduckgo/native-github-asana-sync@v1.1
with:
asana-pat: ${{ secrets.GH_ASANA_SECRET }}
asana-project: ${{ vars.GH_ANDROID_APP_PROJECT_ID }}
asana-section: ${{ vars.GH_ANDROID_APP_INCOMING_SECTION_ID }}
asana-task-name: GH Workflow Failure - Android Sync Critical Path E2E Flows
asana-task-description: The Android Sync Critical Path Flows E2E workflow has failed. See https://github.com/duckduckgo/Android/actions/runs/${{ github.run_id }}
action: 'create-asana-task'
- name: Add Asana task to Browser Sync & Backup project
if: ${{ failure() }}
uses: duckduckgo/native-github-asana-sync@v1.1
with:
asana-pat: ${{ secrets.GH_ASANA_SECRET }}
asana-project: ${{ vars.GH_BROWSER_SYNC_BACKUP_PROJECT_ID }}
asana-section: ${{ vars.GGH_BROWSER_SYNC_BACKUP_PROJECT_TRIAGE_SECTION_ID }}
asana-task-id: ${{ steps.create-failure-task.outputs.taskId }}
action: 'add-task-asana-project'