-
Notifications
You must be signed in to change notification settings - Fork 424
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into sam/add-netp-subscription-auth-support
# By Sam Symons (13) and others # Via Bartek Waresiak (2) and others * main: (69 commits) Custom config URL (#2278) Fix internal user toggling (#2282) Display warning icon in Sync Settings cell when data syncing is disabled (#2281) Add Sync feature flags (#2279) Add Sync Success Rate pixel (#2277) add test 5 and fix test 4 (#2276) Fix: "SwiftLintPlugin" must be enabled before it can be used (#2274) Send WG invalid state reason (#2275) Typo Fix: "SwiftLintPlugin" must be enabled before it can be used Release 7.102.0 (#2273) Add search retention pixel for NetP (#2267) Run sync tests in matrix (#2263) SwiftLint build plugin (#2233) Update VPN active user check and debug options (#2269) Update Autofill Logins copy (#2246) Remove the reconnect/disconnect logic from the connection tester (#2272) Remove the Fastlane notes file temporarily (#2270) remove QR code from save recovery PDF view (#2271) Show dev environment indicator in Sync Settings (#2265) ... # Conflicts: # DuckDuckGo.xcodeproj/project.pbxproj # DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
- Loading branch information
Showing
331 changed files
with
9,355 additions
and
8,167 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
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
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
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 |
---|---|---|
|
@@ -5,9 +5,10 @@ on: | |
- cron: '0 5 * * *' # run at 5 AM UTC | ||
|
||
jobs: | ||
sync-end-to-end-tests: | ||
name: Sync End to end Tests | ||
build-for-sync-end-to-end-tests: | ||
name: Build for Sync End To End Tests | ||
runs-on: macos-13 | ||
timeout-minutes: 30 | ||
|
||
steps: | ||
- name: Check out the code | ||
|
@@ -17,7 +18,7 @@ jobs: | |
|
||
- name: Set cache key hash | ||
run: | | ||
has_only_tags=$(jq '[ .object.pins[].state | has("version") ] | all' DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved) | ||
has_only_tags=$(jq '[ .pins[].state | has("version") ] | all' DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved) | ||
if [[ "$has_only_tags" == "true" ]]; then | ||
echo "cache_key_hash=${{ hashFiles('DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved') }}" >> $GITHUB_ENV | ||
else | ||
|
@@ -40,43 +41,80 @@ jobs: | |
run: | | ||
set -o pipefail && xcodebuild \ | ||
-scheme "DuckDuckGo" \ | ||
-destination "platform=iOS Simulator,name=iPhone 14,OS=16.4" \ | ||
-destination "platform=iOS Simulator,name=iPhone 14" \ | ||
-derivedDataPath "DerivedData" \ | ||
-skipPackagePluginValidation \ | ||
| tee xcodebuild.log | ||
- name: Store Binary | ||
uses: actions/upload-artifact@v4 | ||
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() | ||
with: | ||
name: BuildLogs | ||
path: | | ||
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 | ||
runs-on: macos-13 | ||
timeout-minutes: 30 | ||
strategy: | ||
matrix: | ||
os-version: [15, 16, 17] | ||
#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 | ||
|
||
- name: Create test account for Sync and return the recovery code | ||
uses: duckduckgo/sync_crypto/action@main | ||
id: sync-recovery-code | ||
with: | ||
debug: true | ||
|
||
- name: Sync e2e tests | ||
uses: mobile-dev-inc/[email protected] | ||
- name: Retrieve Binary | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: duckduckgo-ios-app | ||
path: DerivedData/Build/Products/Debug-iphonesimulator/DuckDuckGo.app | ||
|
||
- name: Sync e2e tests | ||
uses: mobile-dev-inc/[email protected] | ||
with: | ||
api-key: ${{ secrets.MAESTRO_CLOUD_API_KEY }} | ||
app-file: DerivedData/Build/Products/Debug-iphonesimulator/DuckDuckGo.app | ||
ios-version: ${{ matrix.os-version }} | ||
workspace: .maestro | ||
include-tags: sync | ||
env: | | ||
CODE=${{ steps.sync-recovery-code.outputs.recovery-code }} | ||
- name: Create Asana task when workflow failed | ||
if: ${{ failure() }} | ||
run: | | ||
curl -s "https://app.asana.com/api/1.0/tasks" \ | ||
--header "Accept: application/json" \ | ||
--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 }}" } }' | ||
notify-failure: | ||
name: Notify on failure | ||
if: ${{ always() && contains(join(needs.*.result, ','), 'failure') }} | ||
needs: [build-for-sync-end-to-end-tests, sync-end-to-end-tests] | ||
runs-on: ubuntu-latest | ||
|
||
- name: Upload logs when workflow failed | ||
uses: actions/upload-artifact@v3 | ||
if: failure() | ||
with: | ||
name: BuildLogs | ||
path: | | ||
xcodebuild.log | ||
DerivedData/Logs/Test/*.xcresult | ||
retention-days: 7 | ||
steps: | ||
- name: Create Asana task when workflow failed | ||
run: | | ||
curl -s "https://app.asana.com/api/1.0/tasks" \ | ||
--header "Accept: application/json" \ | ||
--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 }}" } }' | ||
|
||
|
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 |
---|---|---|
|
@@ -73,3 +73,4 @@ fastlane/test_output | |
# DuckDuckGo | ||
|
||
Configuration/ExternalDeveloper.xcconfig | ||
scripts/assets |
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,39 @@ | ||
# all.yaml | ||
|
||
appId: com.duckduckgo.mobile.ios | ||
--- | ||
|
||
# Set up | ||
- clearState | ||
- launchApp | ||
- runFlow: | ||
when: | ||
visible: | ||
text: "Let’s Do It!" | ||
index: 0 | ||
file: ../shared/onboarding.yaml | ||
|
||
# Load Site | ||
- assertVisible: | ||
id: "searchEntry" | ||
- tapOn: | ||
id: "searchEntry" | ||
- inputText: "https://privacy-test-pages.site/security/address-bar-spoofing/" | ||
- pressKey: Enter | ||
|
||
# Manage onboarding | ||
- runFlow: | ||
when: | ||
visible: | ||
text: "Got It" | ||
index: 0 | ||
file: ../shared/onboarding_browsing.yaml | ||
|
||
# Run AddressBarSpoofing tests | ||
- runFlow: ./1_-_AddressBarSpoof,_basicauth.yaml | ||
- runFlow: ./2_-_AddressBarSpoof,_aboutblank.yaml | ||
- runFlow: ./3_-_AddressBarSpoof,_appschemes.yaml | ||
- runFlow: ./4_-_AddressBarSpoof,_b64_html.yaml | ||
- runFlow: ./5_-_AddressBarSpoof,_downloadpath.yaml | ||
- runFlow: ./6_-_AddressBarSpoof,_formaction.yaml | ||
- runFlow: ./7_-_AddressBarSpoof,_pagerewrite.yaml |
Oops, something went wrong.