Skip to content

Commit

Permalink
Merge branch 'main' into sbarag/autofill-l10n-ship-review
Browse files Browse the repository at this point in the history
# By Sam Symons (8) and others
# Via GitHub
* main: (35 commits)
  Check DBP Prerequisites in App and Disable Login Item If Necessary (#2850)
  Fixes an issue with my last merge
  Implement VPN control through UDS (#2767)
  Add VPN reddit cookie workaround (#2851)
  Bump version to 1.92.0 (202)
  Update Send Feedback icon (#2852)
  Make passwords easier to discover (#2847)
  Bump version to 1.92.0 (201)
  Update BSK for RMF survey changes (#2846)
  DBP: Update people-wizard.com (#2849)
  Remove VPN launch pixels (#2845)
  Prevent showing multiple VPN uninstalled popovers (#2844)
  Bump version to 1.92.0 (200)
  Set marketing version to 1.92.0
  Update embedded files
  DBP: Implement stats pixels (#2812)
  DBP: Add support for noResultsSelector (#2840)
  Fire compilation failed pixel if needed (#1626)
  Update autoconsent to v10.10.0 (#2842)
  Fix running Autofill-related UI tests in CI (#2843)
  ...

# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
  • Loading branch information
samsymons committed Jun 12, 2024
2 parents 3e6e827 + 75a5c9a commit 52510a7
Show file tree
Hide file tree
Showing 209 changed files with 6,577 additions and 1,930 deletions.
1 change: 1 addition & 0 deletions .github/actions/install-certs-and-profiles/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ runs:
# import certificate to keychain
security import $CERTIFICATE_PATH -P "${{ inputs.P12_PASSWORD }}" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security list-keychain -d user -s $KEYCHAIN_PATH
security default-keychain -s $RUNNER_TEMP/app-signing.keychain-db
# apply provisioning profile
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
run: bats --formatter junit scripts/tests/* > bats-tests.xml

- name: Publish unit tests report
uses: mikepenz/action-junit-report@v3
uses: mikepenz/action-junit-report@v4
if: always() # always run even if the previous step fails
with:
check_name: "Test Report: Shell Scripts"
Expand Down Expand Up @@ -140,7 +140,7 @@ jobs:
- name: Cache SPM
if: env.cache_key_hash
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: DerivedData/SourcePackages
key: ${{ runner.os }}-spm-${{ matrix.cache-key }}${{ env.cache_key_hash }}
Expand Down Expand Up @@ -209,7 +209,7 @@ jobs:
fi
- name: Publish unit tests report
uses: mikepenz/action-junit-report@v3
uses: mikepenz/action-junit-report@v4
if: always() # always run even if the previous step fails
with:
check_name: "Test Report: ${{ matrix.flavor }}"
Expand Down Expand Up @@ -323,7 +323,7 @@ jobs:
- name: Cache SPM
if: env.cache_key_hash
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: DerivedData/SourcePackages
key: ${{ runner.os }}-spm-test-release-${{ env.cache_key_hash }}
Expand Down
66 changes: 44 additions & 22 deletions .github/workflows/sync_end_to_end.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Sync-End-to-End tests
name: Sync End-to-End tests

on:
workflow_dispatch:
# schedule:
# - cron: '0 5 * * *' # run at 5 AM UTC
schedule:
- cron: '0 5 * * *' # run at 5 AM UTC

jobs:
sync-end-to-end-tests:
name: Sync End to end Tests
name: Sync End-to-End Tests
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
Expand All @@ -33,7 +33,7 @@ jobs:
- name: Cache SPM
if: env.cache_key_hash
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: DerivedData/SourcePackages
key: ${{ runner.os }}-spm-${{ env.cache_key_hash }}
Expand Down Expand Up @@ -66,43 +66,50 @@ jobs:
with:
debug: true

- name: Build and run Sync e2e tests
- name: Build Sync e2e tests
run: |
set -o pipefail && xcodebuild build-for-testing \
-scheme "Sync End-to-End UI Tests" \
-configuration Review \
-derivedDataPath DerivedData \
-skipPackagePluginValidation \
-skipMacroValidation \
| tee xcodebuild.log \
| xcbeautify
- name: Run UI Tests
env:
CODE: ${{ steps.sync-recovery-code.outputs.recovery-code }}
run: |
defaults write com.duckduckgo.macos.browser.review moveToApplicationsFolderAlertSuppress 1
defaults write com.duckduckgo.macos.browser.review sync.environment Development
defaults write com.duckduckgo.macos.browser.review moveToApplicationsFolderAlertSuppress 1
defaults write com.duckduckgo.macos.browser.review onboarding.finished -bool true
set -o pipefail && xcodebuild test \
set -o pipefail && xcodebuild test-without-building \
-scheme "Sync End-to-End UI Tests" \
-configuration Review \
-derivedDataPath DerivedData \
-skipPackagePluginValidation \
-skipMacroValidation \
-test-iterations 2 \
-retry-tests-on-failure \
| tee xcodebuild.log \
| xcbeautify --report junit --report-path . --junit-report-filename ui-tests.xml \
# - 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", "projects": [ "${{ vars.MACOS_APP_DEVELOPMENT_ASANA_PROJECT_ID }}" ], "notes" : "The end to end workflow has failed. See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" } }'

| tee -a xcodebuild.log \
| tee ui-tests.log
- name: Prepare test report
if: always()
run: |
xcbeautify --report junit --report-path . --junit-report-filename ui-tests.xml < ui-tests.log
- name: Publish tests report
uses: mikepenz/action-junit-report@v3
uses: mikepenz/action-junit-report@v4
if: always() # always run even if the previous step fails
with:
check_name: "Test Report ${{ matrix.runner }}"
report_paths: ui-tests.xml

- name: Upload logs when workflow failed
uses: actions/upload-artifact@v4
if: failure()
if: failure() || cancelled()
with:
name: "BuildLogs ${{ matrix.runner }}"
path: |
Expand All @@ -111,3 +118,18 @@ jobs:
~/Library/Logs/DiagnosticReports/*
retention-days: 7

notify-failure:
name: Notify on failure
if: ${{ always() && github.event_name == 'schedule' && (needs.sync-end-to-end-tests.result == 'failure' || needs.sync-end-to-end-tests.result == 'cancelled') }}
needs: [sync-end-to-end-tests]
runs-on: ubuntu-latest

steps:
- name: Create Asana task when workflow failed
uses: duckduckgo/[email protected]
with:
action: create-asana-task
asana-pat: ${{ secrets.ASANA_ACCESS_TOKEN }}
asana-project: ${{ vars.MACOS_APP_DEVELOPMENT_ASANA_PROJECT_ID }}
asana-task-name: GH Workflow Failure - Sync End-to-End Tests
asana-task-description: The Sync end-to-end workflow has failed. See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
4 changes: 2 additions & 2 deletions .github/workflows/sync_end_to_end_legacy_os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
- name: Cache SPM
if: env.cache_key_hash
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: DerivedData/SourcePackages
key: ${{ runner.os }}-spm-${{ env.cache_key_hash }}
Expand Down Expand Up @@ -156,7 +156,7 @@ jobs:
# --data ' { "data": { "name": "GH Workflow Failure - Sync End to end tests", "projects": [ "${{ vars.MACOS_APP_DEVELOPMENT_ASANA_PROJECT_ID }}" ], "notes" : "The end to end workflow has failed. See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" } }'

- name: Publish tests report
uses: mikepenz/action-junit-report@v3
uses: mikepenz/action-junit-report@v4
if: always()
with:
check_name: "Test Report ${{ matrix.runner }}"
Expand Down
53 changes: 38 additions & 15 deletions .github/workflows/ui_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Cache SPM
if: env.cache_key_hash
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: DerivedData/SourcePackages
key: ${{ runner.os }}-spm-${{ env.cache_key_hash }}
Expand All @@ -60,29 +60,36 @@ jobs:
- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_$(<.xcode-version).app/Contents/Developer

- name: Build and run UI Testing
- name: Build for testing
run: |
set -o pipefail && xcodebuild build-for-testing \
-scheme "UI Tests" \
-configuration Review \
-derivedDataPath DerivedData \
-skipPackagePluginValidation \
-skipMacroValidation \
| tee xcodebuild.log \
| xcbeautify
- name: Run UI Tests
run: |
defaults write com.duckduckgo.macos.browser.review moveToApplicationsFolderAlertSuppress 1
defaults write com.duckduckgo.macos.browser.review onboarding.finished -bool true
set -o pipefail && xcodebuild test \
set -o pipefail && xcodebuild test-without-building \
-scheme "UI Tests" \
-configuration Review \
-derivedDataPath DerivedData \
-skipPackagePluginValidation \
-skipMacroValidation \
-test-iterations 2 \
-retry-tests-on-failure \
| tee xcodebuild.log \
| xcbeautify --report junit --report-path . --junit-report-filename ui-tests.xml
| tee -a xcodebuild.log \
| tee ui-tests.log
# - name: Create Asana task when workflow failed
# if: ${{ failure() }} && github.ref == 'refs/heads/main'
# 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 - UI Tests", "projects": [ "${{ vars.MACOS_APP_DEVELOPMENT_ASANA_PROJECT_ID }}" ], "notes" : "The end to end workflow has failed. See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" } }'
- name: Prepare test report
if: always()
run: |
xcbeautify --report junit --report-path . --junit-report-filename ui-tests.xml < ui-tests.log
- name: Publish tests report
uses: mikepenz/action-junit-report@v4
Expand All @@ -93,11 +100,27 @@ jobs:

- name: Upload logs when workflow failed
uses: actions/upload-artifact@v4
if: failure()
if: failure() || cancelled()
with:
name: "BuildLogs ${{ matrix.runner }}"
path: |
xcodebuild.log
DerivedData/Logs/Test/*.xcresult
~/Library/Logs/DiagnosticReports/*
retention-days: 7
retention-days: 7

notify-failure:
name: Notify on failure
if: ${{ always() && github.event_name == 'schedule' && (needs.ui-tests.result == 'failure' || needs.ui-tests.result == 'cancelled') }}
needs: [ui-tests]
runs-on: ubuntu-latest

steps:
- name: Create Asana task when workflow failed
uses: duckduckgo/[email protected]
with:
action: create-asana-task
asana-pat: ${{ secrets.ASANA_ACCESS_TOKEN }}
asana-project: ${{ vars.MACOS_APP_DEVELOPMENT_ASANA_PROJECT_ID }}
asana-task-name: GH Workflow Failure - UI Tests
asana-task-description: The UI Tests workflow has failed. See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
18 changes: 18 additions & 0 deletions Configuration/AppStore.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,21 @@ DBP_APP_GROUP[config=CI][sdk=*] = $(DBP_BASE_APP_GROUP).debug
DBP_APP_GROUP[config=Review][sdk=*] = $(DBP_BASE_APP_GROUP).review
DBP_APP_GROUP[config=Debug][sdk=*] = $(DBP_BASE_APP_GROUP).debug
DBP_APP_GROUP[config=Release][sdk=*] = $(DBP_BASE_APP_GROUP)

// IPC

// IMPORTANT: The reason this app group was created is because IPC through
// Unix Domain Sockets requires the socket file path to be no longer than
// 108 characters. Sandboxing requirements force us to place said socket
// within an app group container.
//
// Name coding:
// - ipc.a = ipc app store release
// - ipc.a.d = ipc app store debug
// - ipc.a.r = ipc app store review
//
IPC_APP_GROUP_BASE = $(DEVELOPMENT_TEAM).com.ddg.ipc.a
IPC_APP_GROUP[config=CI][sdk=*] = $(IPC_APP_GROUP_BASE).d
IPC_APP_GROUP[config=Review][sdk=*] = $(IPC_APP_GROUP_BASE).r
IPC_APP_GROUP[config=Debug][sdk=*] = $(IPC_APP_GROUP_BASE).d
IPC_APP_GROUP[config=Release][sdk=*] = $(IPC_APP_GROUP_BASE)
2 changes: 1 addition & 1 deletion Configuration/BuildNumber.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
CURRENT_PROJECT_VERSION = 199
CURRENT_PROJECT_VERSION = 202
18 changes: 18 additions & 0 deletions Configuration/DeveloperID.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,21 @@ DBP_APP_GROUP[config=CI][sdk=*] = $(DBP_BASE_APP_GROUP).debug
DBP_APP_GROUP[config=Review][sdk=*] = $(DBP_BASE_APP_GROUP).review
DBP_APP_GROUP[config=Debug][sdk=*] = $(DBP_BASE_APP_GROUP).debug
DBP_APP_GROUP[config=Release][sdk=*] = $(DBP_BASE_APP_GROUP)

// IPC

// IMPORTANT: The reason this app group was created is because IPC through
// Unix Domain Sockets requires the socket file path to be no longer than
// 108 characters. Sandboxing requirements force us to place said socket
// within an app group container.
//
// Name coding:
// - ipc.d = ipc developer id release
// - ipc.d.d = ipc developer id debug
// - ipc.d.r = ipc developer id review
//
IPC_APP_GROUP_BASE = $(DEVELOPMENT_TEAM).com.ddg.ipc
IPC_APP_GROUP[config=CI][sdk=*] = $(IPC_APP_GROUP_BASE).d
IPC_APP_GROUP[config=Review][sdk=*] = $(IPC_APP_GROUP_BASE).r
IPC_APP_GROUP[config=Debug][sdk=*] = $(IPC_APP_GROUP_BASE).d
IPC_APP_GROUP[config=Release][sdk=*] = $(IPC_APP_GROUP_BASE)
2 changes: 1 addition & 1 deletion Configuration/Version.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
MARKETING_VERSION = 1.91.0
MARKETING_VERSION = 1.92.0
Loading

0 comments on commit 52510a7

Please sign in to comment.