From 068c5e8fffc92ef8595574a5c410a37c3657d1d9 Mon Sep 17 00:00:00 2001 From: Elle Sullivan Date: Mon, 4 Nov 2024 18:19:04 +0000 Subject: [PATCH 1/8] Edit file to see if action is triggered --- DuckDuckGoDBPBackgroundAgent/Tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DuckDuckGoDBPBackgroundAgent/Tests b/DuckDuckGoDBPBackgroundAgent/Tests index bb91c28d1d..b2bd787ed1 100644 --- a/DuckDuckGoDBPBackgroundAgent/Tests +++ b/DuckDuckGoDBPBackgroundAgent/Tests @@ -1 +1 @@ -TestsSSSS \ No newline at end of file +TestsSSSSdsfasfsd \ No newline at end of file From 1475b6ef9946c36639735bd451fc15fd95996a63 Mon Sep 17 00:00:00 2001 From: Elle Sullivan Date: Mon, 4 Nov 2024 18:43:32 +0000 Subject: [PATCH 2/8] Try splitting workflow into two files --- .github/workflows/pir_end_to_end_tests.yml | 15 +-------------- ...sts_scheduled_and_release_branches_trigger.yml | 10 ++++++++++ 2 files changed, 11 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/pir_end_to_end_tests_scheduled_and_release_branches_trigger.yml diff --git a/.github/workflows/pir_end_to_end_tests.yml b/.github/workflows/pir_end_to_end_tests.yml index 2165fee20d..c35b67bec0 100644 --- a/.github/workflows/pir_end_to_end_tests.yml +++ b/.github/workflows/pir_end_to_end_tests.yml @@ -1,10 +1,7 @@ name: PIR E2E Tests on: - workflow_dispatch: - schedule: - - cron: '0 3 * * 1-5' # 3AM UTC offsetted to legacy to avoid action-junit-report@v4 bug - pull_request: + workflow_call: jobs: pir-e2e-tests: @@ -18,16 +15,6 @@ jobs: - xcode-version: "15.4" runner: macos-14-xlarge - if: | - startsWith(github.event.pull_request.base.ref, 'release/') || - startsWith(github.event.pull_request.base.ref, 'hotfix/') || - contains(toJson(github.event.pull_request.files.*.filename), 'DBPE2ETests/') || - contains(toJson(github.event.pull_request.files.*.filename), 'LocalPackages/DataBrokerProtection/') || - contains(toJson(github.event.pull_request.files.*.filename), 'LocalPackages/DataBrokerProtection/') || - contains(toJson(github.event.pull_request.files.*.filename), 'DuckDuckGoDBPBackgroundAgent/') || - contains(toJson(github.event.pull_request.files.*.filename), 'DuckDuckGo.xcodeproj/project.pbxproj') || - github.event_name == 'schedule' - concurrency: group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.runner }} cancel-in-progress: true diff --git a/.github/workflows/pir_end_to_end_tests_scheduled_and_release_branches_trigger.yml b/.github/workflows/pir_end_to_end_tests_scheduled_and_release_branches_trigger.yml new file mode 100644 index 0000000000..1517c44d13 --- /dev/null +++ b/.github/workflows/pir_end_to_end_tests_scheduled_and_release_branches_trigger.yml @@ -0,0 +1,10 @@ +name: PIR E2E Tests Scheduled and release branches trigger + +workflow_dispatch: + schedule: + - cron: '0 3 * * 1-5' # 3AM UTC offsetted to legacy to avoid action-junit-report@v4 bug + pull_request: + +jobs: + call-sub-workflow: + uses: ./.github/workflows/pir_end_end_tests.yml From dead3980587ad0f86fa546e29baf5a6b917f94a1 Mon Sep 17 00:00:00 2001 From: Elle Sullivan Date: Mon, 4 Nov 2024 18:44:27 +0000 Subject: [PATCH 3/8] Fix trigger file --- ..._end_to_end_tests_scheduled_and_release_branches_trigger.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pir_end_to_end_tests_scheduled_and_release_branches_trigger.yml b/.github/workflows/pir_end_to_end_tests_scheduled_and_release_branches_trigger.yml index 1517c44d13..0eb07468d9 100644 --- a/.github/workflows/pir_end_to_end_tests_scheduled_and_release_branches_trigger.yml +++ b/.github/workflows/pir_end_to_end_tests_scheduled_and_release_branches_trigger.yml @@ -1,6 +1,6 @@ name: PIR E2E Tests Scheduled and release branches trigger -workflow_dispatch: +on: schedule: - cron: '0 3 * * 1-5' # 3AM UTC offsetted to legacy to avoid action-junit-report@v4 bug pull_request: From 53b67ef84a706152a7d10f5a21ed5a133a4446bf Mon Sep 17 00:00:00 2001 From: Elle Sullivan Date: Mon, 4 Nov 2024 18:45:36 +0000 Subject: [PATCH 4/8] Fix file name reference --- ..._end_to_end_tests_scheduled_and_release_branches_trigger.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pir_end_to_end_tests_scheduled_and_release_branches_trigger.yml b/.github/workflows/pir_end_to_end_tests_scheduled_and_release_branches_trigger.yml index 0eb07468d9..7a8bdec7a0 100644 --- a/.github/workflows/pir_end_to_end_tests_scheduled_and_release_branches_trigger.yml +++ b/.github/workflows/pir_end_to_end_tests_scheduled_and_release_branches_trigger.yml @@ -7,4 +7,4 @@ on: jobs: call-sub-workflow: - uses: ./.github/workflows/pir_end_end_tests.yml + uses: ./.github/workflows/pir_end_to_end_tests.yml From 0fcdd67983a34957f997b8de423320ead87fe987 Mon Sep 17 00:00:00 2001 From: Elle Sullivan Date: Mon, 4 Nov 2024 18:49:44 +0000 Subject: [PATCH 5/8] Add secrets inherit --- ...r_end_to_end_tests_scheduled_and_release_branches_trigger.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pir_end_to_end_tests_scheduled_and_release_branches_trigger.yml b/.github/workflows/pir_end_to_end_tests_scheduled_and_release_branches_trigger.yml index 7a8bdec7a0..c3a9c5275c 100644 --- a/.github/workflows/pir_end_to_end_tests_scheduled_and_release_branches_trigger.yml +++ b/.github/workflows/pir_end_to_end_tests_scheduled_and_release_branches_trigger.yml @@ -8,3 +8,4 @@ on: jobs: call-sub-workflow: uses: ./.github/workflows/pir_end_to_end_tests.yml + secrets: inherit From 13ab11e3d73781e52310fe2c91dcdd47e1495bd3 Mon Sep 17 00:00:00 2001 From: Elle Sullivan Date: Mon, 4 Nov 2024 19:00:42 +0000 Subject: [PATCH 6/8] Add second trigger file for files changed --- .../pir_end_to_end_tests_files_changed_trigger | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/workflows/pir_end_to_end_tests_files_changed_trigger diff --git a/.github/workflows/pir_end_to_end_tests_files_changed_trigger b/.github/workflows/pir_end_to_end_tests_files_changed_trigger new file mode 100644 index 0000000000..138a7fc409 --- /dev/null +++ b/.github/workflows/pir_end_to_end_tests_files_changed_trigger @@ -0,0 +1,13 @@ +name: PIR E2E Tests files changed trigger + +on: + pull_request: + branches-ignore: # skip running on these branches since they are trigged by a different workflow + - hotfix/* + - release/* + paths: ['DBPE2ETests/**', 'LocalPackages/DataBrokerProtection/**', 'DuckDuckGoDBPBackgroundAgent/**', 'DuckDuckGo.xcodeproj/project.pbxproj'] + +jobs: + call-sub-workflow: + uses: ./.github/workflows/pir_end_to_end_tests.yml + secrets: inherit From 1021f98df3a286d64815940ffe7817eab8575106 Mon Sep 17 00:00:00 2001 From: Elle Sullivan Date: Mon, 4 Nov 2024 19:03:37 +0000 Subject: [PATCH 7/8] Fix file extension --- ...ged_trigger => pir_end_to_end_tests_files_changed_trigger.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{pir_end_to_end_tests_files_changed_trigger => pir_end_to_end_tests_files_changed_trigger.yml} (100%) diff --git a/.github/workflows/pir_end_to_end_tests_files_changed_trigger b/.github/workflows/pir_end_to_end_tests_files_changed_trigger.yml similarity index 100% rename from .github/workflows/pir_end_to_end_tests_files_changed_trigger rename to .github/workflows/pir_end_to_end_tests_files_changed_trigger.yml From b7ea6d4cf55229b0554c4846860c042d69ba007d Mon Sep 17 00:00:00 2001 From: Elle Sullivan Date: Mon, 4 Nov 2024 19:03:59 +0000 Subject: [PATCH 8/8] Add branch filters --- ...end_to_end_tests_scheduled_and_release_branches_trigger.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pir_end_to_end_tests_scheduled_and_release_branches_trigger.yml b/.github/workflows/pir_end_to_end_tests_scheduled_and_release_branches_trigger.yml index c3a9c5275c..2d38016ad2 100644 --- a/.github/workflows/pir_end_to_end_tests_scheduled_and_release_branches_trigger.yml +++ b/.github/workflows/pir_end_to_end_tests_scheduled_and_release_branches_trigger.yml @@ -4,6 +4,9 @@ on: schedule: - cron: '0 3 * * 1-5' # 3AM UTC offsetted to legacy to avoid action-junit-report@v4 bug pull_request: + branches: + - hotfix/* + - release/* jobs: call-sub-workflow: