Skip to content

Commit

Permalink
chore: add missing projects and improve workflow (#1487)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromevdl authored Oct 24, 2023
1 parent 228c0d8 commit 5f26c76
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 29 deletions.
53 changes: 29 additions & 24 deletions .github/workflows/pr_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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'
Expand All @@ -48,7 +53,7 @@ jobs:
strategy:
max-parallel: 5
matrix:
java: [8, 11, 15, 16, 17, 18, 19, 20, 21 ]
java: [8, 11, 17, 21, 15, 16, 18, 19, 20]
name: Java ${{ matrix.java }}
env:
JAVA: ${{ matrix.java }}
Expand All @@ -68,44 +73,44 @@ jobs:
run: mvn -B install --file pom.xml
- name: Build Gradle Example - Java
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: Build Gradle Example - Kotlin
run: |
cd examples/powertools-examples-core/kotlin
./gradlew build
if: ${{ matrix.java == '8' }} # Gradle example can only be built on Java 8
working-directory: examples/powertools-examples-core/kotlin
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
- name: Setup Terraform lint
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
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/run-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/**'

Expand Down

0 comments on commit 5f26c76

Please sign in to comment.