You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Establish CI Workflow with Static Analysis (SpotBugs & PMD) #11
Following the migration from SourceForge, a Continuous Integration (CI) workflow is required to automate build validation. This workflow utilizes a Maven ci profile to execute the clean verify target, integrating static analysis tools to maintain code quality and security standards from the outset.
Goals
Implement a GitHub Actions workflow that enforces build stability and code health by running SpotBugs and PMD as part of the automated check-in process.
Tasks
Workflow Configuration
Create .github/workflows/ci.yml triggered by push and pull_request on the main branch.
Configure actions/setup-java for the project's JDK baseline.
Maven CI Profile Integration
Update pom.xml to include a ci profile.
Configure SpotBugs Maven Plugin within the ci profile to detect potential bugs.
Configure PMD Maven Plugin within the ci profile to enforce coding standards.
Build Execution
Execute the build command: mvn -B clean verify -Pci
Ensure the build fails if SpotBugs or PMD find violations (fail-on-error).
Reporting & Optimization
Enable Maven dependency caching to improve workflow efficiency.
Add a build status badge to the README.md.
Context
Using the clean verify target ensures that both unit and integration tests are executed in a fresh environment. Integrating SpotBugs and PMD into the ci profile ensures that static analysis is strictly enforced during the CI process without impacting standard local builds unless the profile is explicitly invoked.
Activity