From 27d304e7572e8fa3700dbbba25e9efd2da199bb4 Mon Sep 17 00:00:00 2001 From: Wai Sing Yiu Date: Wed, 10 Apr 2024 14:15:03 +0100 Subject: [PATCH 1/3] Run tests in dependent projects as part of CI --- .github/workflows/event-consumer.yml | 2 +- .github/workflows/fake-breaking-news.yml | 2 +- .github/workflows/football.yml | 2 +- .github/workflows/notification-worker-lambdas.yml | 2 +- .github/workflows/notification.yml | 2 +- .github/workflows/registration.yml | 2 +- .github/workflows/report-extractor.yml | 2 +- .github/workflows/report.yml | 2 +- .github/workflows/schedule-lambda.yml | 2 +- .github/workflows/slo-monitor.yml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/event-consumer.yml b/.github/workflows/event-consumer.yml index e8f4e590c..0d4d1887f 100644 --- a/.github/workflows/event-consumer.yml +++ b/.github/workflows/event-consumer.yml @@ -38,7 +38,7 @@ jobs: role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }} - name: Compile, test and assembly - run: sbt "project eventconsumer" "compile" "test" "assembly" + run: sbt "project commoneventconsumer" "compile" "test" "project eventconsumer" "compile" "test" "assembly" - name: Copy jar to root run: cp eventconsumer/target/scala-*/eventconsumer.jar . diff --git a/.github/workflows/fake-breaking-news.yml b/.github/workflows/fake-breaking-news.yml index 10578dbea..420976d20 100644 --- a/.github/workflows/fake-breaking-news.yml +++ b/.github/workflows/fake-breaking-news.yml @@ -40,7 +40,7 @@ jobs: role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }} - name: Compile, test and assembly - run: sbt "project fakebreakingnewslambda" "compile" "test" "assembly" + run: sbt "project" "common" "compile" "test" "project apiModels" "compile" "test" "project fakebreakingnewslambda" "compile" "test" "assembly" - name: Copy jar to root run: cp fakebreakingnewslambda/target/scala-*/fakebreakingnewslambda.jar . diff --git a/.github/workflows/football.yml b/.github/workflows/football.yml index 1e62ac619..52772e72e 100644 --- a/.github/workflows/football.yml +++ b/.github/workflows/football.yml @@ -38,7 +38,7 @@ jobs: role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }} - name: Compile, test and assembly - run: sbt "project football" "compile" "test" "assembly" + run: sbt "project apiModels" "compile" "test" "project football" "compile" "test" "assembly" - name: Copy jar to root run: cp football/target/scala-*/football.jar . diff --git a/.github/workflows/notification-worker-lambdas.yml b/.github/workflows/notification-worker-lambdas.yml index 072c4205f..168795db7 100644 --- a/.github/workflows/notification-worker-lambdas.yml +++ b/.github/workflows/notification-worker-lambdas.yml @@ -51,7 +51,7 @@ jobs: mask-password: 'true' - name: Compile and test - run: sbt "project notificationworkerlambda" "compile" "test" + run: sbt "project common" "compile" "test" "project notificationworkerlambda" "compile" "test" - name: Build docker image run: sbt docker:publishLocal diff --git a/.github/workflows/notification.yml b/.github/workflows/notification.yml index 308b7be05..52baa7572 100644 --- a/.github/workflows/notification.yml +++ b/.github/workflows/notification.yml @@ -40,7 +40,7 @@ jobs: role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }} - name: Compile, test and package - run: sbt "project notification" "compile" "test" "debian:packageBin" + run: sbt "project common" "compile" "test" "project commonscheduledynamodb" "compile" "test" "project notification" "compile" "test" "debian:packageBin" - name: Upload to riff-raff uses: guardian/actions-riff-raff@v3 diff --git a/.github/workflows/registration.yml b/.github/workflows/registration.yml index 3570d5021..506c0e5ca 100644 --- a/.github/workflows/registration.yml +++ b/.github/workflows/registration.yml @@ -55,7 +55,7 @@ jobs: npm run synth - name: Compile, test and package - run: sbt "project registration" "compile" "test" "debian:packageBin" + run: sbt "project common" "compile" "test" "project registration" "compile" "test" "debian:packageBin" - name: Upload to riff-raff uses: guardian/actions-riff-raff@v3 diff --git a/.github/workflows/report-extractor.yml b/.github/workflows/report-extractor.yml index e407742b8..952d04d9d 100644 --- a/.github/workflows/report-extractor.yml +++ b/.github/workflows/report-extractor.yml @@ -39,7 +39,7 @@ jobs: role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }} - name: Compile, test and assembly - run: sbt "project reportextractor" "compile" "test" "assembly" + run: sbt "project common" "compile" "test" "project reportextractor" "compile" "test" "assembly" - name: Copy jar to root run: cp reportextractor/target/scala-*/reportextractor.jar . diff --git a/.github/workflows/report.yml b/.github/workflows/report.yml index 81c9e137e..0c3b94260 100644 --- a/.github/workflows/report.yml +++ b/.github/workflows/report.yml @@ -40,7 +40,7 @@ jobs: role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }} - name: Compile, test and package - run: sbt "project report" "compile" "test" "debian:packageBin" + run: sbt "project common" "compile" "test" "project report" "compile" "test" "debian:packageBin" - name: Upload to riff-raff uses: guardian/actions-riff-raff@v3 diff --git a/.github/workflows/schedule-lambda.yml b/.github/workflows/schedule-lambda.yml index eca70cd13..a534f56df 100644 --- a/.github/workflows/schedule-lambda.yml +++ b/.github/workflows/schedule-lambda.yml @@ -38,7 +38,7 @@ jobs: role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }} - name: Compile, test and assembly - run: sbt "project schedule" "compile" "test" "assembly" + run: sbt "project commonscheduledynamodb" "compile" "test" "project schedule" "compile" "test" "assembly" - name: Copy jar to root run: cp schedulelambda/target/scala-*/schedule.jar . diff --git a/.github/workflows/slo-monitor.yml b/.github/workflows/slo-monitor.yml index fbc1db09d..1b29fbc69 100644 --- a/.github/workflows/slo-monitor.yml +++ b/.github/workflows/slo-monitor.yml @@ -45,7 +45,7 @@ jobs: role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }} - name: Compile, test and assembly - run: sbt "project slomonitor" "compile" "test" "assembly" + run: sbt "project commoneventconsumer" "compile" "test" "project slomonitor" "compile" "test" "assembly" - name: Copy jar to root run: cp slomonitor/target/scala-*/slomonitor.jar . From b9a13a164d59d24be8686b1134ebbdfc978aef88 Mon Sep 17 00:00:00 2001 From: Wai Sing Yiu Date: Wed, 10 Apr 2024 14:20:39 +0100 Subject: [PATCH 2/3] Fixed typo --- .github/workflows/fake-breaking-news.yml | 2 +- .github/workflows/football.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/fake-breaking-news.yml b/.github/workflows/fake-breaking-news.yml index 420976d20..08b387e1d 100644 --- a/.github/workflows/fake-breaking-news.yml +++ b/.github/workflows/fake-breaking-news.yml @@ -40,7 +40,7 @@ jobs: role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }} - name: Compile, test and assembly - run: sbt "project" "common" "compile" "test" "project apiModels" "compile" "test" "project fakebreakingnewslambda" "compile" "test" "assembly" + run: sbt "project common" "compile" "test" "project apiModels" "compile" "test" "project fakebreakingnewslambda" "compile" "test" "assembly" - name: Copy jar to root run: cp fakebreakingnewslambda/target/scala-*/fakebreakingnewslambda.jar . diff --git a/.github/workflows/football.yml b/.github/workflows/football.yml index 52772e72e..10ddb389c 100644 --- a/.github/workflows/football.yml +++ b/.github/workflows/football.yml @@ -38,7 +38,7 @@ jobs: role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }} - name: Compile, test and assembly - run: sbt "project apiModels" "compile" "test" "project football" "compile" "test" "assembly" + run: sbt "project api-models" "compile" "test" "project football" "compile" "test" "assembly" - name: Copy jar to root run: cp football/target/scala-*/football.jar . From fade517ad091243938ca07080b3c55a0ede104f8 Mon Sep 17 00:00:00 2001 From: Wai Sing Yiu Date: Wed, 10 Apr 2024 14:34:14 +0100 Subject: [PATCH 3/3] Fixed typo --- .github/workflows/fake-breaking-news.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/fake-breaking-news.yml b/.github/workflows/fake-breaking-news.yml index 08b387e1d..c7294ab17 100644 --- a/.github/workflows/fake-breaking-news.yml +++ b/.github/workflows/fake-breaking-news.yml @@ -40,7 +40,7 @@ jobs: role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }} - name: Compile, test and assembly - run: sbt "project common" "compile" "test" "project apiModels" "compile" "test" "project fakebreakingnewslambda" "compile" "test" "assembly" + run: sbt "project common" "compile" "test" "project api-models" "compile" "test" "project fakebreakingnewslambda" "compile" "test" "assembly" - name: Copy jar to root run: cp fakebreakingnewslambda/target/scala-*/fakebreakingnewslambda.jar .