diff --git a/.github/workflows/kafka-streams-lint.yml b/.github/workflows/kafka-streams-lint.yml index bc7b3259..45784883 100644 --- a/.github/workflows/kafka-streams-lint.yml +++ b/.github/workflows/kafka-streams-lint.yml @@ -1,4 +1,5 @@ name: Kafka Streams Lint + on: workflow_call: secrets: @@ -6,14 +7,12 @@ on: required: true inputs: java-version: - description: | - The Java version. + description: 'The Java version.' type: number required: false - default: 21 + default: 25 # jdk-distribution: - description: | - The JDK distribution. + description: 'The JDK distribution.' type: string required: false default: temurin @@ -22,14 +21,16 @@ on: required: false type: string default: . + jobs: detekt: runs-on: ubuntu-latest defaults: run: - working-directory: ${{inputs.working-directory}} + working-directory: ${{ inputs.working-directory }} steps: - uses: actions/checkout@v4 + - uses: extenda/actions/gcp-secret-manager@v0 with: service-account-key: ${{ secrets.SECRET_AUTH }} @@ -55,35 +56,27 @@ jobs: java-version: ${{ inputs.java-version }} cache: maven - - name: Get detekt plugin for kafka streams - uses: extenda/actions/maven@v0 - with: - args: dependency:get -Dartifact=com.retailsvc:pnp-processors-core-common:0.125.0:jar - service-account-key: ${{ secrets.SECRET_AUTH }} - - - name: Build classpath with Maven - uses: extenda/actions/maven@v0 - with: - args: dependency:build-classpath -DincludeScope=runtime -Dmdep.outputFile=cp.txt -q - service-account-key: ${{ secrets.SECRET_AUTH }} - - - name: Build classpath lib dir with Maven + - name: Prepare Classes and Dependencies uses: extenda/actions/maven@v0 with: - args: dependency:copy-dependencies -DoutputDirectory=lib -q + args: > + compile -Denforcer.skip=true -q + dependency:get -Dartifact=com.retailsvc:pnp-processors-core-common:0.125.0:jar + dependency:build-classpath -DincludeScope=runtime -Dmdep.outputFile=cp.txt + dependency:copy-dependencies -DoutputDirectory=lib service-account-key: ${{ secrets.SECRET_AUTH }} - name: Download Detekt CLI run: | + mkdir -p lib curl -sLo lib/detekt-cli.jar \ https://github.com/detekt/detekt/releases/download/v1.23.8/detekt-cli-1.23.8-all.jar - - name: Verify with Detekt run: | - java -cp "target/classes:lib/*" \ + java -cp "target/classes:$(cat cp.txt):lib/*" \ io.gitlab.arturbosch.detekt.cli.Main \ --input src/main/kotlin \ --config detekt.yml \ --classpath "target/classes:$(cat cp.txt)" \ - --plugins ~/.m2/repository/com/retailsvc/pnp-processors-core-common/0.125.0/pnp-processors-core-common-0.125.0.jar \ \ No newline at end of file + --plugins ~/.m2/repository/com/retailsvc/pnp-processors-core-common/0.125.0/pnp-processors-core-common-0.125.0.jar \ No newline at end of file