Skip to content
Draft
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
23 changes: 21 additions & 2 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading