diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 7e976a8e..bc6b1da1 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -27,7 +27,26 @@ jobs: boot: 2.8.3 # or use 'latest' to always provision latest version of boot - name: Get leiningen version run: lein -v - - name: Run linter - run: lein lint || test $? -eq 2 + - name: Lint + run: | + # Force lein to download the clj-kondo dependency + lein with-profile lint deps :tree + + # Find the exact path to the clj-kondo uberjar + CLJ_KONDO_PATH=$(find ~/.m2/repository/clj-kondo -name "*standalone.jar") + echo "Found clj-kondo at: $CLJ_KONDO_PATH" + + # Run clj-kondo directly using the uberjar + java -jar $CLJ_KONDO_PATH --lint src + EXIT_CODE=$? + echo "Linter exited with code: $EXIT_CODE" + + if [ $EXIT_CODE -eq 0 ] || [ $EXIT_CODE -eq 2 ]; then + echo "Success or warnings only, passing build." + exit 0 + else + echo "Error detected (exit code $EXIT_CODE), failing build." + exit 1 + fi - name: Run tests run: lein test