Skip to content

Release v0.4.0: Dynamic Plugin Support, OAuth/PKCE Authentication, Enhanced Validation & Test Coverage #53

Release v0.4.0: Dynamic Plugin Support, OAuth/PKCE Authentication, Enhanced Validation & Test Coverage

Release v0.4.0: Dynamic Plugin Support, OAuth/PKCE Authentication, Enhanced Validation & Test Coverage #53

Workflow file for this run

name: CI
on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev ]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write # Required for uploading SARIF files
actions: read
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Java JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle' # Cache Gradle dependencies
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: false # Allow writing to cache on main/dev branches
- name: Build and analyze
run: ./gradlew build detekt detektSarif --build-cache
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results
path: build/reports/tests/test/
- name: Upload Detekt SARIF
uses: github/codeql-action/upload-sarif@v4
if: always()
with:
sarif_file: build/reports/detekt/detekt.sarif
category: detekt
- name: Upload Detekt reports
uses: actions/upload-artifact@v4
if: always()
with:
name: detekt-reports
path: build/reports/detekt/
- name: Comment PR with Detekt results
uses: actions/github-script@v6
if: github.event_name == 'pull_request' && always()
with:
script: |
const fs = require('fs');
try {
const detektReport = fs.readFileSync('build/reports/detekt/detekt.txt', 'utf8');
if (detektReport.includes('Build failed with 1 exception')) {
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'ℹ️ **Detekt found code quality suggestions**\n\nThese are recommendations, not blockers. Check the Detekt reports in the CI artifacts for details.'
});
}
} catch (error) {
console.log('No Detekt report found or error reading it:', error.message);
}