Skip to content

Commit 8b85492

Browse files
committed
initial commit
0 parents  commit 8b85492

34 files changed

Lines changed: 2075 additions & 0 deletions

.github/dependabot.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
version: 2
2+
updates:
3+
# Enable version updates for Gradle
4+
- package-ecosystem: "gradle"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
day: "monday"
9+
time: "09:00"
10+
open-pull-requests-limit: 10
11+
reviewers:
12+
- "claymccoy"
13+
assignees:
14+
- "claymccoy"
15+
commit-message:
16+
prefix: "deps"
17+
prefix-development: "deps-dev"
18+
include: "scope"
19+
labels:
20+
- "dependencies"
21+
- "gradle"
22+
23+
# Enable version updates for GitHub Actions
24+
- package-ecosystem: "github-actions"
25+
directory: "/"
26+
schedule:
27+
interval: "weekly"
28+
day: "monday"
29+
time: "09:00"
30+
open-pull-requests-limit: 5
31+
reviewers:
32+
- "claymccoy"
33+
assignees:
34+
- "claymccoy"
35+
commit-message:
36+
prefix: "ci"
37+
include: "scope"
38+
labels:
39+
- "dependencies"
40+
- "github-actions"

.github/pull_request_template.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
## Description
2+
Brief description of the changes in this PR.
3+
4+
## Type of Change
5+
- [ ] Bug fix (non-breaking change which fixes an issue)
6+
- [ ] New feature (non-breaking change which adds functionality)
7+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
8+
- [ ] Documentation update
9+
- [ ] Refactoring (no functional changes)
10+
- [ ] Performance improvement
11+
- [ ] Test coverage improvement
12+
13+
## Changes Made
14+
- List the main changes made in this PR
15+
- Include any new dependencies added
16+
- Include any configuration changes
17+
18+
## Testing
19+
- [ ] Unit tests pass locally
20+
- [ ] Integration tests pass locally
21+
- [ ] Manual testing completed
22+
- [ ] New tests added for new functionality
23+
24+
## Checklist
25+
- [ ] My code follows the project's coding standards
26+
- [ ] I have performed a self-review of my own code
27+
- [ ] I have commented my code, particularly in hard-to-understand areas
28+
- [ ] I have made corresponding changes to the documentation
29+
- [ ] My changes generate no new warnings
30+
- [ ] I have added tests that prove my fix is effective or that my feature works
31+
- [ ] New and existing unit tests pass locally with my changes
32+
- [ ] Any dependent changes have been merged and published
33+
34+
## Screenshots (if applicable)
35+
Add screenshots to help explain your changes.
36+
37+
## Additional Notes
38+
Any additional information that reviewers should know.

.github/workflows/README.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# GitHub Workflows Documentation
2+
3+
This project includes several GitHub Actions workflows for continuous integration and security.
4+
5+
## Workflows
6+
7+
### 1. Build and Test (`build.yml`)
8+
9+
**Triggers:**
10+
- Push to `main` or `develop` branches
11+
- Pull requests to `main` branch
12+
13+
**Jobs:**
14+
- **test**: Runs tests on Java 17 and 21
15+
- **build**: Builds the application after successful tests
16+
- **release**: Creates releases on main branch pushes
17+
18+
**Features:**
19+
- Multi-version Java testing (17, 21)
20+
- Test result reporting with `dorny/test-reporter`
21+
- Artifact uploads for build outputs
22+
- Automated releases with versioning
23+
24+
### 2. CI/CD Pipeline (`ci.yml`)
25+
26+
**Triggers:**
27+
- Push to `main` or `develop` branches
28+
- Pull requests to `main` branch
29+
30+
**Jobs:**
31+
- **test**: Comprehensive testing with matrix strategy
32+
- **build-and-publish**: Build and release management
33+
- **security-scan**: OWASP dependency vulnerability scanning
34+
35+
**Features:**
36+
- Gradle caching for faster builds
37+
- Test result uploads
38+
- Security vulnerability reporting
39+
- Release artifact management
40+
41+
### 3. Static Code Analysis (`static-analysis.yml`)
42+
43+
**Triggers:**
44+
- Push to `main` or `develop` branches
45+
- Pull requests to `main` branch
46+
47+
**Jobs:**
48+
- **static-analysis**: SpotBugs, PMD, and Checkstyle analysis
49+
- **security-scan**: OWASP dependency vulnerability scanning
50+
51+
**Features:**
52+
- SpotBugs: Bug pattern detection and code quality
53+
- PMD: Code style and potential issues
54+
- Checkstyle: Code formatting and style compliance
55+
- OWASP dependency scanning for vulnerabilities
56+
- Detailed reporting and artifact uploads
57+
58+
## Configuration Files
59+
60+
### Dependabot (`dependabot.yml`)
61+
62+
Automatically creates pull requests for:
63+
- Gradle dependency updates (weekly on Mondays)
64+
- GitHub Actions updates (weekly on Mondays)
65+
66+
### Pull Request Template
67+
68+
Located at `.github/pull_request_template.md`, provides:
69+
- Structured PR descriptions
70+
- Change type categorization
71+
- Testing checklists
72+
- Review guidelines
73+
74+
## Security Features
75+
76+
1. **OWASP Dependency Check**: Scans for known vulnerabilities
77+
2. **SpotBugs Analysis**: Static analysis for bug patterns and code quality
78+
3. **PMD Analysis**: Code style and potential issue detection
79+
4. **Checkstyle**: Code formatting and style compliance
80+
5. **Dependabot**: Automated dependency updates
81+
6. **JaCoCo Coverage**: Code coverage reporting and verification
82+
83+
## Usage Examples
84+
85+
### Local Development
86+
```bash
87+
# Run the same checks as CI
88+
./gradlew ciBuild
89+
90+
# Run only static analysis
91+
./gradlew staticAnalysis
92+
93+
# Run security scan
94+
./gradlew dependencyCheckAnalyze
95+
open build/reports/dependency-check-report.html
96+
97+
# Run individual static analysis tools
98+
./gradlew spotbugsMain pmdMain checkstyleMain
99+
```
100+
101+
### GitHub Actions
102+
- All pushes trigger the build pipeline
103+
- PRs run tests and security scans
104+
- Main branch pushes create releases
105+
- Weekly security scans run automatically

.github/workflows/build.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Build and Test
2+
3+
on:
4+
push:
5+
branches: [ master, develop ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
# Add permissions for test reporting
10+
permissions:
11+
contents: read
12+
checks: write
13+
pull-requests: write
14+
15+
jobs:
16+
test:
17+
name: Test on Java 21
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
24+
- name: Set up JDK 21
25+
uses: actions/setup-java@v4
26+
with:
27+
java-version: '21'
28+
distribution: 'temurin'
29+
30+
- name: Setup Gradle
31+
uses: gradle/gradle-build-action@v2
32+
with:
33+
gradle-version: wrapper
34+
35+
- name: Run CI build (tests + static analysis + coverage)
36+
run: ./gradlew ciBuild --no-daemon
37+
38+
- name: Publish Test Results
39+
uses: EnricoMi/publish-unit-test-result-action@v2
40+
if: always()
41+
with:
42+
files: |
43+
build/test-results/test/*.xml
44+
check_name: "Test Results (Java 21)"
45+
comment_title: "Test Results (Java 21)"
46+
47+
- name: Upload test results
48+
uses: actions/upload-artifact@v4
49+
if: always()
50+
with:
51+
name: test-results-java-21
52+
path: |
53+
build/reports/tests/
54+
build/test-results/
55+
56+
- name: Upload static analysis results
57+
uses: actions/upload-artifact@v4
58+
if: always()
59+
with:
60+
name: static-analysis-results
61+
path: |
62+
build/reports/pmd/
63+
build/reports/checkstyle/

.gitignore

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Gradle
2+
.gradle/
3+
build/
4+
target/
5+
!gradle/wrapper/gradle-wrapper.jar
6+
!**/src/main/**/build/
7+
!**/src/test/**/build/
8+
9+
# IDE
10+
.idea/
11+
*.iws
12+
*.iml
13+
*.ipr
14+
out/
15+
.vscode/
16+
*.swp
17+
*.swo
18+
19+
# OS
20+
.DS_Store
21+
.DS_Store?
22+
._*
23+
.Spotlight-V100
24+
.Trashes
25+
ehthumbs.db
26+
Thumbs.db
27+
28+
# Application specific
29+
logs/
30+
*.log
31+
*.log.*
32+
temp/
33+
tmp/
34+
35+
# Spring Boot
36+
spring-boot-devtools.properties
37+
38+
# Security
39+
*.key
40+
*.pem
41+
*.p12
42+
*.jks
43+
44+
# Environment
45+
.env
46+
.env.local
47+
.env.*.local
48+
49+
# Test reports
50+
/reports/
51+
/test-results/
52+
53+
# Static analysis reports
54+
/build/reports/
55+
dependency-check-report.html
56+
dependency-check-report.json
57+
58+
# JaCoCo
59+
*.exec
60+
61+
# Temporary build files
62+
*.gradle.backup

0 commit comments

Comments
 (0)