From 992ff52dda034275192cd18fc1862f73a81a0308 Mon Sep 17 00:00:00 2001 From: Elliott Brooks <21270878+elliette@users.noreply.github.com> Date: Thu, 20 Apr 2023 14:34:41 -0700 Subject: [PATCH 1/5] Test workflow --- .github/workflows/daily_testing.yml | 35 ++++++++++++++++++++++++ dwds/dart_test.yaml | 1 + dwds/test/chrome_proxy_service_test.dart | 3 +- 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/daily_testing.yml diff --git a/.github/workflows/daily_testing.yml b/.github/workflows/daily_testing.yml new file mode 100644 index 000000000..18d8ba8c8 --- /dev/null +++ b/.github/workflows/daily_testing.yml @@ -0,0 +1,35 @@ +# A CI workflow to run tests on a daily cron job. + +name: Daily Testing + +on: + pull_request + +jobs: + daily_testing: + name: Daily Testing + runs-on: ubuntu-latest + steps: + - name: Setup Dart SDK + uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + with: + sdk: dev + - id: checkout + name: Checkout repository + uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 + - id: dwds_pub_upgrade + name: dwds; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: dwds + - id: dwds_daily_tests + name: "dwds; dart test --tags=daily" + run: "dart test --tags=daily" + if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" + working-directory: dwds + - name: "Notify failure" + if: "always() && steps.dwds_daily_tests.conclusion == 'failure'" + run: | + curl -H "Content-Type: application/json" -X POST -d \ + "{'text':'Testing chat webhook, disregard! @elliottbrooks ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}'}" \ + "${{ secrets.BUILD_AND_TEST_TEAM_CHAT_WEBHOOK_URL }}" diff --git a/dwds/dart_test.yaml b/dwds/dart_test.yaml index 479dd5834..0da5d782e 100644 --- a/dwds/dart_test.yaml +++ b/dwds/dart_test.yaml @@ -3,3 +3,4 @@ retry: 3 tags: extension: # Extension tests require configuration, so we may exclude. + daily: # Daily tests also run on a scheduled daily cron job. diff --git a/dwds/test/chrome_proxy_service_test.dart b/dwds/test/chrome_proxy_service_test.dart index 5b88171d2..0e027b704 100644 --- a/dwds/test/chrome_proxy_service_test.dart +++ b/dwds/test/chrome_proxy_service_test.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. @TestOn('vm') +@Tags(['daily']) @Timeout(Duration(minutes: 2)) import 'dart:async'; import 'dart:convert'; @@ -82,7 +83,7 @@ void main() { expect(firstBp.id, equals(secondBp.id)); // Remove breakpoint so it doesn't impact other tests. - await service.removeBreakpoint(isolate.id!, firstBp.id!); + await service.removeBreakpoint(isolate.id!, 'notAnId'); }); test('addBreakpoint succeeds when sending the same breakpoint twice', From f4b083e95ceb07941e7c9fc09ee911277b335f94 Mon Sep 17 00:00:00 2001 From: Elliott Brooks <21270878+elliette@users.noreply.github.com> Date: Thu, 20 Apr 2023 14:47:57 -0700 Subject: [PATCH 2/5] Update notification --- .github/workflows/daily_testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/daily_testing.yml b/.github/workflows/daily_testing.yml index 18d8ba8c8..8f11e6808 100644 --- a/.github/workflows/daily_testing.yml +++ b/.github/workflows/daily_testing.yml @@ -31,5 +31,5 @@ jobs: if: "always() && steps.dwds_daily_tests.conclusion == 'failure'" run: | curl -H "Content-Type: application/json" -X POST -d \ - "{'text':'Testing chat webhook, disregard! @elliottbrooks ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}'}" \ + "{'text':'Testing chat webhook, disregard! @${{ secrets.REPO_OWNER}} ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}'}" \ "${{ secrets.BUILD_AND_TEST_TEAM_CHAT_WEBHOOK_URL }}" From b62536cba6ee4b08def048e2971178d7608ade8f Mon Sep 17 00:00:00 2001 From: Elliott Brooks <21270878+elliette@users.noreply.github.com> Date: Thu, 20 Apr 2023 15:21:00 -0700 Subject: [PATCH 3/5] Reset to being a cron job --- .github/workflows/daily_testing.yml | 5 +++-- dwds/test/chrome_proxy_service_test.dart | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/daily_testing.yml b/.github/workflows/daily_testing.yml index 8f11e6808..006e3b5c7 100644 --- a/.github/workflows/daily_testing.yml +++ b/.github/workflows/daily_testing.yml @@ -3,7 +3,8 @@ name: Daily Testing on: - pull_request + schedule: + - cron: '00 14 * * *' # Everyday at 3:00 PM UTC (8:00 AM PST) jobs: daily_testing: @@ -31,5 +32,5 @@ jobs: if: "always() && steps.dwds_daily_tests.conclusion == 'failure'" run: | curl -H "Content-Type: application/json" -X POST -d \ - "{'text':'Testing chat webhook, disregard! @${{ secrets.REPO_OWNER}} ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}'}" \ + "{'text':'Daily Webdev tests failed! ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}'}" \ "${{ secrets.BUILD_AND_TEST_TEAM_CHAT_WEBHOOK_URL }}" diff --git a/dwds/test/chrome_proxy_service_test.dart b/dwds/test/chrome_proxy_service_test.dart index 0e027b704..8a93ac2e2 100644 --- a/dwds/test/chrome_proxy_service_test.dart +++ b/dwds/test/chrome_proxy_service_test.dart @@ -83,7 +83,7 @@ void main() { expect(firstBp.id, equals(secondBp.id)); // Remove breakpoint so it doesn't impact other tests. - await service.removeBreakpoint(isolate.id!, 'notAnId'); + await service.removeBreakpoint(isolate.id!, firstBp.id!); }); test('addBreakpoint succeeds when sending the same breakpoint twice', From a8e57cfeab2ccf34b1c8392f53588c640f66e0dd Mon Sep 17 00:00:00 2001 From: Elliott Brooks <21270878+elliette@users.noreply.github.com> Date: Thu, 20 Apr 2023 16:18:08 -0700 Subject: [PATCH 4/5] Update webhook URL --- .github/workflows/daily_testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/daily_testing.yml b/.github/workflows/daily_testing.yml index 006e3b5c7..0f961e3ec 100644 --- a/.github/workflows/daily_testing.yml +++ b/.github/workflows/daily_testing.yml @@ -33,4 +33,4 @@ jobs: run: | curl -H "Content-Type: application/json" -X POST -d \ "{'text':'Daily Webdev tests failed! ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}'}" \ - "${{ secrets.BUILD_AND_TEST_TEAM_CHAT_WEBHOOK_URL }}" + "${{ secrets.WEBDEV_NOTIFICATION_CHAT_WEBHOOK }}" From 1a521eae9660bb24d5ae5c22bc5385e46bb2fc82 Mon Sep 17 00:00:00 2001 From: Elliott Brooks <21270878+elliette@users.noreply.github.com> Date: Tue, 25 Apr 2023 09:25:14 -0700 Subject: [PATCH 5/5] Switch to main channel --- .github/workflows/daily_testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/daily_testing.yml b/.github/workflows/daily_testing.yml index 0f961e3ec..5434b64e3 100644 --- a/.github/workflows/daily_testing.yml +++ b/.github/workflows/daily_testing.yml @@ -14,7 +14,7 @@ jobs: - name: Setup Dart SDK uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: - sdk: dev + sdk: main - id: checkout name: Checkout repository uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3