From 84608f190c2e72ade9ecd374cd011127eafd8e7a Mon Sep 17 00:00:00 2001 From: Sam Symons Date: Mon, 13 Jan 2025 14:32:49 -0800 Subject: [PATCH 1/3] Rename workflows. --- .../workflows/{adhoc.yml => ios-adhoc.yml} | 6 ++--- .../workflows/{alpha.yml => ios-alpha.yml} | 2 +- .../{end-to-end.yml => ios-end-to-end.yml} | 10 ++++---- .../{nightly.yml => ios-nightly.yml} | 4 ++-- .../workflows/{pr.yml => ios-pr-checks.yml} | 2 +- .../{pr-labels.yml => ios-pr-labels.yml} | 0 .../{pr-task-url.yml => ios-pr-task-url.yml} | 2 +- ...tflight.yml => ios-promote-testflight.yml} | 4 ++-- .../{release.yml => ios-release.yml} | 10 ++++---- .../{stale-pr.yml => ios-stale-pr.yml} | 0 ...end-to-end.yml => ios-sync-end-to-end.yml} | 24 ++++++++----------- 11 files changed, 30 insertions(+), 34 deletions(-) rename .github/workflows/{adhoc.yml => ios-adhoc.yml} (98%) rename .github/workflows/{alpha.yml => ios-alpha.yml} (98%) rename .github/workflows/{end-to-end.yml => ios-end-to-end.yml} (98%) rename .github/workflows/{nightly.yml => ios-nightly.yml} (97%) rename .github/workflows/{pr.yml => ios-pr-checks.yml} (99%) rename .github/workflows/{pr-labels.yml => ios-pr-labels.yml} (100%) rename .github/workflows/{pr-task-url.yml => ios-pr-task-url.yml} (99%) rename .github/workflows/{promote_testflight.yml => ios-promote-testflight.yml} (94%) rename .github/workflows/{release.yml => ios-release.yml} (98%) rename .github/workflows/{stale-pr.yml => ios-stale-pr.yml} (100%) rename .github/workflows/{sync-end-to-end.yml => ios-sync-end-to-end.yml} (97%) diff --git a/.github/workflows/adhoc.yml b/.github/workflows/ios-adhoc.yml similarity index 98% rename from .github/workflows/adhoc.yml rename to .github/workflows/ios-adhoc.yml index 84be30b111..f06e248b2e 100644 --- a/.github/workflows/adhoc.yml +++ b/.github/workflows/ios-adhoc.yml @@ -1,4 +1,4 @@ -name: Make ad-hoc build +name: Make ad-hoc build (iOS) on: workflow_dispatch: @@ -53,7 +53,7 @@ jobs: if [[ "${{ github.event.inputs.build-type }}" == "Release" ]]; then lane_to_use="release_adhoc" fi - + if [[ -n "${{ github.event.inputs.suffix }}" ]]; then bundle exec fastlane ${lane_to_use} suffix:${{ github.event.inputs.suffix }} else @@ -81,7 +81,7 @@ jobs: with: name: ${{ env.dsyms_filename }} path: ${{ env.dsyms_path }} - + - name: Get Asana Task ID id: get-task-id if: github.event.inputs.asana-task-url diff --git a/.github/workflows/alpha.yml b/.github/workflows/ios-alpha.yml similarity index 98% rename from .github/workflows/alpha.yml rename to .github/workflows/ios-alpha.yml index 619dc58114..28c7a7fa86 100644 --- a/.github/workflows/alpha.yml +++ b/.github/workflows/ios-alpha.yml @@ -1,4 +1,4 @@ -name: Make TestFlight Alpha Build +name: Make TestFlight Alpha Build (iOS) on: workflow_dispatch: diff --git a/.github/workflows/end-to-end.yml b/.github/workflows/ios-end-to-end.yml similarity index 98% rename from .github/workflows/end-to-end.yml rename to .github/workflows/ios-end-to-end.yml index 61ae9d72c3..9b5259f486 100644 --- a/.github/workflows/end-to-end.yml +++ b/.github/workflows/ios-end-to-end.yml @@ -1,4 +1,4 @@ -name: End-to-End tests +name: End-to-End tests (iOS) on: schedule: @@ -10,7 +10,7 @@ jobs: name: Build End to End Tests runs-on: macos-15-xlarge timeout-minutes: 30 - + steps: - name: Check out the code uses: actions/checkout@v3 @@ -54,7 +54,7 @@ jobs: with: name: duckduckgo-ios-app path: DerivedData/Build/Products/Debug-iphonesimulator/DuckDuckGo.app - + - name: Upload logs when workflow failed uses: actions/upload-artifact@v4 if: failure() || cancelled() @@ -73,7 +73,7 @@ jobs: strategy: matrix: test-tag: [release, privacy, securityTest, adClick] - max-parallel: 1 # Uncomment this line to run tests sequentially. + max-parallel: 1 # Uncomment this line to run tests sequentially. fail-fast: false steps: @@ -94,7 +94,7 @@ jobs: - name: End to End tests run: | export PATH="$PATH":"$HOME/.maestro/bin"; maestro cloud --apiKey ${{ secrets.ROBIN_API_KEY }} --project-id ${{ secrets.ROBIN_PROJECT_KEY }} -e ONBOARDING_COMPLETED=true --fail-on-timeout=true --fail-on-cancellation=true --timeout=150 --ios-version=17 --include-tags=${{ matrix.test-tag }} DerivedData/Build/Products/Debug-iphonesimulator/DuckDuckGo.app .maestro/ - + # notify-failure: # name: Notify on failure # if: ${{ always() && contains(join(needs.*.result, ','), 'failure') && github.ref_name == 'main' }} diff --git a/.github/workflows/nightly.yml b/.github/workflows/ios-nightly.yml similarity index 97% rename from .github/workflows/nightly.yml rename to .github/workflows/ios-nightly.yml index c7f6af3185..b7de8d0a05 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/ios-nightly.yml @@ -1,4 +1,4 @@ -name: Nightly Test and Deploy +name: Nightly Test and Deploy (iOS) on: schedule: @@ -100,7 +100,7 @@ jobs: deploy-alpha: name: Deploy Nightly Alpha Build - uses: ./.github/workflows/alpha.yml + uses: ./.github/workflows/ios-alpha.yml with: destination: "Nightly Alpha Group" secrets: diff --git a/.github/workflows/pr.yml b/.github/workflows/ios-pr-checks.yml similarity index 99% rename from .github/workflows/pr.yml rename to .github/workflows/ios-pr-checks.yml index 763e3d8c21..dce19b4c16 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/ios-pr-checks.yml @@ -1,4 +1,4 @@ -name: PR Checks +name: PR Checks (iOS) on: push: diff --git a/.github/workflows/pr-labels.yml b/.github/workflows/ios-pr-labels.yml similarity index 100% rename from .github/workflows/pr-labels.yml rename to .github/workflows/ios-pr-labels.yml diff --git a/.github/workflows/pr-task-url.yml b/.github/workflows/ios-pr-task-url.yml similarity index 99% rename from .github/workflows/pr-task-url.yml rename to .github/workflows/ios-pr-task-url.yml index 7f130fe540..faa5d4e81a 100644 --- a/.github/workflows/pr-task-url.yml +++ b/.github/workflows/ios-pr-task-url.yml @@ -1,6 +1,6 @@ name: Asana PR Task URL -on: +on: pull_request: types: [opened, edited, closed, synchronize, review_requested, ready_for_review] diff --git a/.github/workflows/promote_testflight.yml b/.github/workflows/ios-promote-testflight.yml similarity index 94% rename from .github/workflows/promote_testflight.yml rename to .github/workflows/ios-promote-testflight.yml index a9d94321c9..8a8946e1dd 100644 --- a/.github/workflows/promote_testflight.yml +++ b/.github/workflows/ios-promote-testflight.yml @@ -1,6 +1,6 @@ -name: Promote TestFlight to App Store +name: Promote TestFlight to App Store (iOS) -on: +on: workflow_dispatch: {} jobs: diff --git a/.github/workflows/release.yml b/.github/workflows/ios-release.yml similarity index 98% rename from .github/workflows/release.yml rename to .github/workflows/ios-release.yml index 2dffb0be3b..1560446ca1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/ios-release.yml @@ -1,4 +1,4 @@ -name: Make App Store Connect Release +name: Make App Store Connect Release (iOS) on: workflow_dispatch: @@ -92,10 +92,10 @@ jobs: else echo "::error::Asana Task URL has incorrect format (attempted to match ${task_url_regex})." fi - + - name: Upload debug symbols to Asana if: ${{ always() && github.event.inputs.asana-task-url }} - env: + env: ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }} run: | if [[ -f ${{ env.dsyms_path }} ]]; then @@ -129,8 +129,8 @@ jobs: if [[ -z "${MM_USER_HANDLE}" ]]; then echo "Mattermost user handle not known for ${{ github.actor }}, skipping sending message" - else + else curl -s -H 'Content-type: application/json' \ -d "$(envsubst < ./scripts/assets/appstore-release-mm-template.json | jq ".${{ job.status }}")" \ ${{ secrets.MM_WEBHOOK_URL }} - fi + fi diff --git a/.github/workflows/stale-pr.yml b/.github/workflows/ios-stale-pr.yml similarity index 100% rename from .github/workflows/stale-pr.yml rename to .github/workflows/ios-stale-pr.yml diff --git a/.github/workflows/sync-end-to-end.yml b/.github/workflows/ios-sync-end-to-end.yml similarity index 97% rename from .github/workflows/sync-end-to-end.yml rename to .github/workflows/ios-sync-end-to-end.yml index adee7a00c1..13002fc397 100644 --- a/.github/workflows/sync-end-to-end.yml +++ b/.github/workflows/ios-sync-end-to-end.yml @@ -1,4 +1,4 @@ -name: Sync-End-to-End tests +name: Sync-End-to-End tests (iOS) on: schedule: @@ -54,7 +54,7 @@ jobs: with: name: duckduckgo-ios-app path: DerivedData/Build/Products/Debug-iphonesimulator/DuckDuckGo.app - + - name: Upload logs when workflow failed uses: actions/upload-artifact@v4 if: failure() || cancelled() @@ -64,7 +64,7 @@ jobs: xcodebuild.log DerivedData/Logs/Test/*.xcresult retention-days: 7 - + sync-end-to-end-tests: name: Sync End To End Tests needs: build-for-sync-end-to-end-tests @@ -73,9 +73,9 @@ jobs: strategy: matrix: os-version: [17] #[15, 16, 17] - max-parallel: 1 # Uncomment this line to run tests sequentially. + max-parallel: 1 # Uncomment this line to run tests sequentially. fail-fast: false - + steps: - name: Check out the code uses: actions/checkout@v3 # Don't need submodules here as this is only for the tests folder @@ -85,7 +85,7 @@ jobs: id: sync-recovery-code with: debug: true - + - name: Retrieve Binary uses: actions/download-artifact@v4 with: @@ -95,19 +95,19 @@ jobs: - name: Install Maestro run: | export MAESTRO_VERSION=1.39.1; curl -Ls "https://get.maestro.mobile.dev" | bash - + - name: Overwrite default config with sync one run: | cp .maestro/config-sync .maestro/config.yaml - - - name: Sync e2e tests + + - name: Sync e2e tests run: | export PATH="$PATH":"$HOME/.maestro/bin"; maestro cloud --apiKey ${{ secrets.ROBIN_API_KEY }} --project-id ${{ secrets.ROBIN_PROJECT_KEY }} -e ONBOARDING_COMPLETED=true --env=CODE=${{ steps.sync-recovery-code.outputs.recovery-code }} --fail-on-timeout=true --fail-on-cancellation=true --timeout=150 --ios-version=${{ matrix.os-version }} --include-tags=sync --app-file DerivedData/Build/Products/Debug-iphonesimulator/DuckDuckGo.app --flows .maestro/ - name: Reset config run: | git checkout .maestro/config.yaml - + # notify-failure: # name: Notify on failure # if: ${{ always() && contains(join(needs.*.result, ','), 'failure') && github.ref_name == 'main' }} @@ -122,7 +122,3 @@ jobs: # --header "Authorization: Bearer ${{ secrets.ASANA_ACCESS_TOKEN }}" \ # --header "Content-Type: application/json" \ # --data ' { "data": { "name": "GH Workflow Failure - Sync End to end tests", "workspace": "${{ vars.GH_ASANA_WORKSPACE_ID }}", "projects": [ "${{ vars.GH_ASANA_IOS_APP_PROJECT_ID }}" ], "notes" : "The end to end workflow has failed. See https://github.com/duckduckgo/iOS/actions/runs/${{ github.run_id }}" } }' - - - - From 84583c120e5efe77fc9f99428d73148e94446800 Mon Sep 17 00:00:00 2001 From: Sam Symons Date: Tue, 14 Jan 2025 08:21:50 -0800 Subject: [PATCH 2/3] Update workflow names. --- .github/workflows/danger.yml | 4 ++-- .github/workflows/ios-adhoc.yml | 2 +- .github/workflows/ios-alpha.yml | 2 +- .github/workflows/ios-end-to-end.yml | 2 +- .github/workflows/ios-nightly.yml | 2 +- .github/workflows/ios-pr-checks.yml | 2 +- .github/workflows/ios-pr-labels.yml | 2 +- .github/workflows/ios-pr-task-url.yml | 2 +- .github/workflows/ios-promote-testflight.yml | 2 +- .github/workflows/ios-release.yml | 2 +- .github/workflows/ios-stale-pr.yml | 2 +- .github/workflows/ios-sync-end-to-end.yml | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/danger.yml b/.github/workflows/danger.yml index 3e27085c64..abd0edab94 100644 --- a/.github/workflows/danger.yml +++ b/.github/workflows/danger.yml @@ -1,5 +1,5 @@ -name: Danger JS -on: +name: iOS - Danger JS +on: pull_request: types: [labeled, unlabeled, opened, reopened, edited, synchronize] diff --git a/.github/workflows/ios-adhoc.yml b/.github/workflows/ios-adhoc.yml index f06e248b2e..74f6aa5037 100644 --- a/.github/workflows/ios-adhoc.yml +++ b/.github/workflows/ios-adhoc.yml @@ -1,4 +1,4 @@ -name: Make ad-hoc build (iOS) +name: iOS - Make ad-hoc build on: workflow_dispatch: diff --git a/.github/workflows/ios-alpha.yml b/.github/workflows/ios-alpha.yml index 28c7a7fa86..08d13d74a0 100644 --- a/.github/workflows/ios-alpha.yml +++ b/.github/workflows/ios-alpha.yml @@ -1,4 +1,4 @@ -name: Make TestFlight Alpha Build (iOS) +name: iOS - Make TestFlight Alpha Build on: workflow_dispatch: diff --git a/.github/workflows/ios-end-to-end.yml b/.github/workflows/ios-end-to-end.yml index 9b5259f486..b03bb61f03 100644 --- a/.github/workflows/ios-end-to-end.yml +++ b/.github/workflows/ios-end-to-end.yml @@ -1,4 +1,4 @@ -name: End-to-End tests (iOS) +name: iOS - End-to-End tests on: schedule: diff --git a/.github/workflows/ios-nightly.yml b/.github/workflows/ios-nightly.yml index b7de8d0a05..2eb702c311 100644 --- a/.github/workflows/ios-nightly.yml +++ b/.github/workflows/ios-nightly.yml @@ -1,4 +1,4 @@ -name: Nightly Test and Deploy (iOS) +name: iOS - Nightly Test and Deploy on: schedule: diff --git a/.github/workflows/ios-pr-checks.yml b/.github/workflows/ios-pr-checks.yml index dce19b4c16..529fced768 100644 --- a/.github/workflows/ios-pr-checks.yml +++ b/.github/workflows/ios-pr-checks.yml @@ -1,4 +1,4 @@ -name: PR Checks (iOS) +name: iOS - PR Checks on: push: diff --git a/.github/workflows/ios-pr-labels.yml b/.github/workflows/ios-pr-labels.yml index 33a3dfb317..c1d6158464 100644 --- a/.github/workflows/ios-pr-labels.yml +++ b/.github/workflows/ios-pr-labels.yml @@ -1,4 +1,4 @@ -name: PR Labels +name: iOS - PR Labels on: push: diff --git a/.github/workflows/ios-pr-task-url.yml b/.github/workflows/ios-pr-task-url.yml index faa5d4e81a..37fc02b47a 100644 --- a/.github/workflows/ios-pr-task-url.yml +++ b/.github/workflows/ios-pr-task-url.yml @@ -1,4 +1,4 @@ -name: Asana PR Task URL +name: iOS - Asana PR Task URL on: pull_request: diff --git a/.github/workflows/ios-promote-testflight.yml b/.github/workflows/ios-promote-testflight.yml index 8a8946e1dd..7e342d29da 100644 --- a/.github/workflows/ios-promote-testflight.yml +++ b/.github/workflows/ios-promote-testflight.yml @@ -1,4 +1,4 @@ -name: Promote TestFlight to App Store (iOS) +name: iOS - Promote TestFlight to App Store on: workflow_dispatch: {} diff --git a/.github/workflows/ios-release.yml b/.github/workflows/ios-release.yml index fb4cd6564b..e66f0762d1 100644 --- a/.github/workflows/ios-release.yml +++ b/.github/workflows/ios-release.yml @@ -1,4 +1,4 @@ -name: Make App Store Connect Release (iOS) +name: iOS - Make App Store Connect Release on: workflow_dispatch: diff --git a/.github/workflows/ios-stale-pr.yml b/.github/workflows/ios-stale-pr.yml index a4a6e92c29..2f7ef96f6c 100644 --- a/.github/workflows/ios-stale-pr.yml +++ b/.github/workflows/ios-stale-pr.yml @@ -1,4 +1,4 @@ -name: Close Stale Pull Requests +name: iOS - Close Stale Pull Requests on: schedule: diff --git a/.github/workflows/ios-sync-end-to-end.yml b/.github/workflows/ios-sync-end-to-end.yml index 13002fc397..aa5c154ee1 100644 --- a/.github/workflows/ios-sync-end-to-end.yml +++ b/.github/workflows/ios-sync-end-to-end.yml @@ -1,4 +1,4 @@ -name: Sync-End-to-End tests (iOS) +name: iOS - Sync-End-to-End tests on: schedule: From a8dba2be779837514dbe429bd724c5b38f16cc63 Mon Sep 17 00:00:00 2001 From: Sam Symons Date: Tue, 14 Jan 2025 08:24:19 -0800 Subject: [PATCH 3/3] Rename `danger.yml` to `ios-danger.yml`. --- .github/workflows/{danger.yml => ios-danger.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{danger.yml => ios-danger.yml} (100%) diff --git a/.github/workflows/danger.yml b/.github/workflows/ios-danger.yml similarity index 100% rename from .github/workflows/danger.yml rename to .github/workflows/ios-danger.yml