generated from admin/template
40 lines
940 B
YAML
40 lines
940 B
YAML
name: Detekt
|
|
|
|
on:
|
|
push:
|
|
branches: [main, master]
|
|
pull_request:
|
|
branches: [main, master]
|
|
|
|
jobs:
|
|
detekt:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up JDK 17
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: '17'
|
|
distribution: 'temurin'
|
|
|
|
- name: Download Detekt CLI
|
|
run: |
|
|
curl -sSLO https://github.com/detekt/detekt/releases/download/v1.23.6/detekt-cli-1.23.6-all.jar
|
|
|
|
- name: Run Detekt
|
|
run: |
|
|
java -jar detekt-cli-1.23.6-all.jar --input . --report txt:detekt-report.txt
|
|
continue-on-error: true
|
|
|
|
- name: Show Detekt report
|
|
run: cat detekt-report.txt
|
|
if: always()
|
|
|
|
- name: Upload Detekt report
|
|
uses: actions/upload-artifact@v4
|
|
if: always()
|
|
with:
|
|
name: detekt-report
|
|
path: detekt-report.txt |