From a0f201a92d6c5828a93d65fc98796721ff995f1c Mon Sep 17 00:00:00 2001 From: Jerome Van Der Linden Date: Mon, 23 Oct 2023 13:56:42 +0200 Subject: [PATCH 1/5] add missing projects and improve workflow --- .github/workflows/pr_build.yml | 45 +++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/.github/workflows/pr_build.yml b/.github/workflows/pr_build.yml index 79945f237..f87e8a624 100644 --- a/.github/workflows/pr_build.yml +++ b/.github/workflows/pr_build.yml @@ -6,18 +6,21 @@ on: - main - v2 paths: + - 'powertools-batch/**' - 'powertools-cloudformation/**' - - 'powertools-core/**' - - 'powertools-serialization/**' + - 'powertools-core/**' # not in v2 + - 'powertools-common/**' # v2 only + - 'powertools-e2e-tests/**' + - 'powertools-idempotency/**' + - 'powertools-large-messages/**' - 'powertools-logging/**' - - 'powertools-sqs/**' + - 'powertools-metrics/**' + - 'powertools-parameters/**' + - 'powertools-serialization/**' + - 'powertools-sqs/**' # not in v2 + - 'powertools-test-suite/**' # not in v2 - 'powertools-tracing/**' - 'powertools-validation/**' - - 'powertools-idempotency/**' - - 'powertools-parameters/**' - - 'powertools-metrics/**' - - 'powertools-test-suite/**' - - 'powertools-e2e-tests/**' - 'examples/**' - 'pom.xml' - 'examples/pom.xml' @@ -26,18 +29,20 @@ on: branches: - main paths: + - 'powertools-batch/**' - 'powertools-cloudformation/**' - 'powertools-core/**' - - 'powertools-serialization/**' + - 'powertools-e2e-tests/**' + - 'powertools-idempotency/**' + - 'powertools-large-messages/**' - 'powertools-logging/**' + - 'powertools-metrics/**' + - 'powertools-parameters/**' + - 'powertools-serialization/**' - 'powertools-sqs/**' + - 'powertools-test-suite/**' - 'powertools-tracing/**' - 'powertools-validation/**' - - 'powertools-idempotency/**' - - 'powertools-parameters/**' - - 'powertools-metrics/**' - - 'powertools-test-suite/**' - - 'powertools-e2e-tests/**' - 'examples/**' - 'pom.xml' - 'examples/pom.xml' @@ -68,22 +73,22 @@ jobs: run: mvn -B install --file pom.xml - name: Build Gradle Example if: ${{ matrix.java == '8' }} # Gradle example can only be built on Java 8 - run: | - cd examples/powertools-examples-core/gradle - ./gradlew build + working-directory: examples/powertools-examples-core/gradle + run: ./gradlew build - name: Setup Terraform if: ${{ matrix.java == '11' }} uses: hashicorp/setup-terraform@633666f66e0061ca3b725c73b2ec20cd13a8fdd1 #v2.0.3 - name: Setup AWS credentials + if: ${{ matrix.java == '11' }} uses: aws-actions/configure-aws-credentials@5fd3084fc36e372ff1fff382a39b10d03659f355 # v2.2.0 with: role-to-assume: ${{ secrets.AWS_ROLE_ARN_TO_ASSUME }} aws-region: ${{ env.AWS_REGION }} - name: Terraform validate + working-directory: examples/powertools-examples-core/terraform if: ${{ matrix.java == '11' }} run: | terraform -version - cd examples/powertools-examples-core/terraform terraform init -backend=false terraform validate terraform plan @@ -91,17 +96,17 @@ jobs: if: ${{ matrix.java == '11' }} uses: terraform-linters/setup-tflint@a5a1af8c6551fb10c53f1cd4ba62359f1973746f # v3.1.1 - name: Terraform lint + working-directory: examples/powertools-examples-core/terraform if: ${{ matrix.java == '11' }} run: | tflint --version - cd examples/powertools-examples-core/terraform tflint --init tflint -f compact - name: Upload coverage to Codecov uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3.1.1 if: ${{ matrix.java == '11' }} # publish results once with: - files: ./powertools-cloudformation/target/site/jacoco/jacoco.xml,./powertools-core/target/site/jacoco/jacoco.xml,./powertools-idempotency/target/site/jacoco/jacoco.xml,./powertools-logging/target/site/jacoco/jacoco.xml,./powertools-metrics/target/site/jacoco/jacoco.xml,./powertools-parameters/target/site/jacoco/jacoco.xml,./powertools-serialization/target/site/jacoco/jacoco.xml,./powertools-sqs/target/site/jacoco/jacoco.xml,./powertools-tracing/target/site/jacoco/jacoco.xml,./powertools-validation/target/site/jacoco/jacoco.xml + files: ./powertools-cloudformation/target/site/jacoco/jacoco.xml,./powertools-core/target/site/jacoco/jacoco.xml,./powertools-idempotency/target/site/jacoco/jacoco.xml,./powertools-logging/target/site/jacoco/jacoco.xml,./powertools-metrics/target/site/jacoco/jacoco.xml,./powertools-parameters/target/site/jacoco/jacoco.xml,./powertools-serialization/target/site/jacoco/jacoco.xml,./powertools-sqs/target/site/jacoco/jacoco.xml,./powertools-tracing/target/site/jacoco/jacoco.xml,./powertools-validation/target/site/jacoco/jacoco.xml,./powertools-large-messages/target/site/jacoco/jacoco.xml,./powertools-batch/target/site/jacoco/jacoco.xml savepr: runs-on: ubuntu-latest name: Save PR number if running on PR by dependabot From 56e1c5bafdb74a95bb5cde12fcad7bfa0f70efc5 Mon Sep 17 00:00:00 2001 From: Jerome Van Der Linden Date: Mon, 23 Oct 2023 14:06:38 +0200 Subject: [PATCH 2/5] add corretto 21 --- .github/workflows/pr_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_build.yml b/.github/workflows/pr_build.yml index f87e8a624..8dff4e534 100644 --- a/.github/workflows/pr_build.yml +++ b/.github/workflows/pr_build.yml @@ -53,7 +53,7 @@ jobs: strategy: max-parallel: 5 matrix: - java: [8, 11, 15, 16, 17, 18, 19, 20 ] + java: [8, 11, 17, 21, 15, 16, 18, 19, 20] name: Java ${{ matrix.java }} env: JAVA: ${{ matrix.java }} From a04f06e37adff42434f85547e4bd25207bbdd0f2 Mon Sep 17 00:00:00 2001 From: Jerome Van Der Linden Date: Mon, 23 Oct 2023 14:10:26 +0200 Subject: [PATCH 3/5] add corretto 21 and missing projects in e2e --- .github/workflows/run-e2e-tests.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/run-e2e-tests.yml b/.github/workflows/run-e2e-tests.yml index c4a8c6fb2..226f63dd7 100644 --- a/.github/workflows/run-e2e-tests.yml +++ b/.github/workflows/run-e2e-tests.yml @@ -9,14 +9,16 @@ on: - v2 paths: # add other modules when there are under e2e tests - 'powertools-e2e-tests/**' + - 'powertools-batch/**' - 'powertools-core/**' - - 'powertools-serialization/**' - - 'powertools-logging/**' - - 'powertools-tracing/**' + - 'powertools-common/**' - 'powertools-idempotency/**' - - 'powertools-parameters/**' + - 'powertools-large-message/**' + - 'powertools-logging/**' - 'powertools-metrics/**' - - 'powertools-large-messages/**' + - 'powertools-parameters/**' + - 'powertools-serialization/**' + - 'powertools-tracing/**' - 'pom.xml' - '.github/workflows/**' @@ -32,7 +34,7 @@ jobs: strategy: max-parallel: 3 matrix: - java: [ 8, 11, 17 ] + java: [ 8, 11, 17, 21 ] name: End-to-end tests java${{ matrix.java }} env: JAVA_VERSION: ${{ matrix.java }} From c95815a6e77bd2280117f65ec80523a466ffe9bc Mon Sep 17 00:00:00 2001 From: Jerome Van Der Linden Date: Mon, 23 Oct 2023 14:11:46 +0200 Subject: [PATCH 4/5] no corretto 21 on lambda yet --- .github/workflows/run-e2e-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-e2e-tests.yml b/.github/workflows/run-e2e-tests.yml index 226f63dd7..a2a1b9aec 100644 --- a/.github/workflows/run-e2e-tests.yml +++ b/.github/workflows/run-e2e-tests.yml @@ -34,7 +34,7 @@ jobs: strategy: max-parallel: 3 matrix: - java: [ 8, 11, 17, 21 ] + java: [ 8, 11, 17 ] name: End-to-end tests java${{ matrix.java }} env: JAVA_VERSION: ${{ matrix.java }} From 59c965beb384061ddc36c55d19431365ce2c2343 Mon Sep 17 00:00:00 2001 From: Jerome Van Der Linden Date: Mon, 23 Oct 2023 15:49:48 +0200 Subject: [PATCH 5/5] remove 21 --- .github/workflows/pr_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_build.yml b/.github/workflows/pr_build.yml index 8dff4e534..867dd13a0 100644 --- a/.github/workflows/pr_build.yml +++ b/.github/workflows/pr_build.yml @@ -53,7 +53,7 @@ jobs: strategy: max-parallel: 5 matrix: - java: [8, 11, 17, 21, 15, 16, 18, 19, 20] + java: [8, 11, 17, 15, 16, 18, 19, 20] name: Java ${{ matrix.java }} env: JAVA: ${{ matrix.java }}