Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 16 additions & 23 deletions .github/workflows/kafka-streams-lint.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
name: Kafka Streams Lint

on:
workflow_call:
secrets:
SECRET_AUTH:
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
Expand All @@ -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 }}
Expand All @@ -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 \
--plugins ~/.m2/repository/com/retailsvc/pnp-processors-core-common/0.125.0/pnp-processors-core-common-0.125.0.jar