Skip to content

Commit 3cbf22d

Browse files
committed
Polish repository quality surface
1 parent d36dfc8 commit 3cbf22d

64 files changed

Lines changed: 4139 additions & 125 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
indent_style = space
8+
indent_size = 4
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @krotname
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Report a regression or unexpected behavior
4+
labels: bug
5+
---
6+
7+
### Description
8+
9+
A clear and concise description of what is wrong.
10+
11+
### Reproduction steps
12+
13+
1. Step to reproduce
14+
2. Step to reproduce
15+
3. Step to reproduce
16+
17+
### Expected result
18+
19+
What should happen?
20+
21+
### Actual result
22+
23+
What actually happens?
24+
25+
### Environment
26+
27+
- OS:
28+
- Java version:
29+
- Command run:
30+
- Environment variables used:
31+
32+
### Logs / stack traces
33+
34+
Paste relevant output, logs, or stack trace (redact secrets).
35+
36+
### Additional notes
37+
38+
Attachments or notes that could help reproduce.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Project documentation
4+
url: https://github.com/krotname/JavaSoundRecorder/blob/master/README.md
5+
about: Read the portfolio-focused overview and setup docs first.
6+
- name: Security issue
7+
url: https://github.com/krotname/JavaSoundRecorder/security/policy
8+
about: Report security concerns through the repository security policy.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
name: Feature request
3+
about: Suggest an improvement
4+
labels: enhancement
5+
---
6+
7+
### What problem does this solve?
8+
9+
### Suggested behavior
10+
11+
### Acceptance criteria

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
## Summary
2+
3+
Briefly describe the behavior change and why it is needed.
4+
5+
## Testing
6+
7+
- [ ] Relevant tests added/updated
8+
- [ ] `*UnitTest` pass
9+
- [ ] `*IntegrationTest` pass
10+
- [ ] `*UiTest` pass (if UI touched)
11+
- [ ] `*ContractTest` / `*SmokeTest` pass (if interfaces/flows touched)
12+
13+
## Quality checks
14+
15+
- [ ] Code comments added for non-obvious logic changes
16+
- [ ] No hardcoded secrets in diffs
17+
- [ ] Docs updated (`README`/`docs`/`CHANGELOG` where behavior changed)
18+
19+
## Operational impact
20+
21+
- Breaking changes:
22+
- Rollback plan:
23+
- UI evidence (screenshots / manual verification):
24+
25+
## CI impact
26+
27+
- [ ] Release/packaging impact assessed
28+
- [ ] Docker/entrypoint compatibility checked
29+

.github/dependabot.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "maven"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
open-pull-requests-limit: 5
8+
groups:
9+
maven-dependencies:
10+
patterns:
11+
- "*"
12+
- package-ecosystem: "github-actions"
13+
directory: "/"
14+
schedule:
15+
interval: "weekly"
16+
open-pull-requests-limit: 3
17+
groups:
18+
github-actions:
19+
patterns:
20+
- "*"

.github/workflows/actionlint.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Workflow lint
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- main
8+
pull_request:
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
permissions:
15+
contents: read
16+
17+
jobs:
18+
actionlint:
19+
name: actionlint
20+
runs-on: ubuntu-latest
21+
timeout-minutes: 5
22+
steps:
23+
- uses: actions/checkout@v4
24+
with:
25+
persist-credentials: false
26+
- name: Check GitHub Actions workflows
27+
uses: docker://rhysd/actionlint:1.7.12
28+
with:
29+
args: -color

.github/workflows/ci.yml

Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- main
8+
pull_request:
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
permissions:
15+
contents: read
16+
pull-requests: read
17+
18+
jobs:
19+
unit-tests:
20+
name: Unit tests
21+
runs-on: ubuntu-latest
22+
timeout-minutes: 10
23+
steps:
24+
- uses: actions/checkout@v4
25+
with:
26+
persist-credentials: false
27+
- name: Setup Java
28+
uses: actions/setup-java@v4
29+
with:
30+
distribution: temurin
31+
java-version: 21
32+
cache: maven
33+
- name: Run unit tests
34+
run: bash ./mvnw -q -Dtest=*UnitTest test
35+
36+
integration-tests:
37+
name: Integration tests
38+
runs-on: ubuntu-latest
39+
timeout-minutes: 10
40+
steps:
41+
- uses: actions/checkout@v4
42+
with:
43+
persist-credentials: false
44+
- name: Setup Java
45+
uses: actions/setup-java@v4
46+
with:
47+
distribution: temurin
48+
java-version: 21
49+
cache: maven
50+
- name: Run integration tests
51+
run: bash ./mvnw -q -Dtest=*IntegrationTest test
52+
53+
ui-tests:
54+
name: UI tests
55+
runs-on: ubuntu-latest
56+
timeout-minutes: 10
57+
steps:
58+
- uses: actions/checkout@v4
59+
with:
60+
persist-credentials: false
61+
- name: Setup Java
62+
uses: actions/setup-java@v4
63+
with:
64+
distribution: temurin
65+
java-version: 21
66+
cache: maven
67+
- name: Run UI tests
68+
env:
69+
JAVA_TOOL_OPTIONS: -Djava.awt.headless=true
70+
run: bash ./mvnw -q -Dtest=*UiTest test
71+
72+
contract-and-smoke-tests:
73+
name: Contract & smoke tests
74+
runs-on: ubuntu-latest
75+
timeout-minutes: 10
76+
steps:
77+
- uses: actions/checkout@v4
78+
with:
79+
persist-credentials: false
80+
- name: Setup Java
81+
uses: actions/setup-java@v4
82+
with:
83+
distribution: temurin
84+
java-version: 21
85+
cache: maven
86+
- name: Run contract and smoke tests
87+
run: bash ./mvnw -q -Dtest='*ContractTest,*SmokeTest' test
88+
89+
architecture-tests:
90+
name: Architecture tests
91+
runs-on: ubuntu-latest
92+
timeout-minutes: 10
93+
steps:
94+
- uses: actions/checkout@v4
95+
with:
96+
persist-credentials: false
97+
- name: Setup Java
98+
uses: actions/setup-java@v4
99+
with:
100+
distribution: temurin
101+
java-version: 21
102+
cache: maven
103+
- name: Run architecture tests
104+
run: bash ./mvnw -q -Dtest=ArchitectureUnitTest test
105+
106+
quality-gate:
107+
name: Quality and coverage
108+
runs-on: ubuntu-latest
109+
timeout-minutes: 20
110+
needs:
111+
- unit-tests
112+
- integration-tests
113+
- ui-tests
114+
- contract-and-smoke-tests
115+
- architecture-tests
116+
steps:
117+
- uses: actions/checkout@v4
118+
with:
119+
persist-credentials: false
120+
- name: Setup Java
121+
uses: actions/setup-java@v4
122+
with:
123+
distribution: temurin
124+
java-version: 21
125+
cache: maven
126+
- name: Build and enforce quality gates
127+
run: bash ./mvnw -q verify
128+
- name: Upload coverage
129+
uses: codecov/codecov-action@v4
130+
with:
131+
files: target/site/jacoco/jacoco.xml
132+
fail_ci_if_error: false
133+
134+
static-analysis:
135+
name: Static checks
136+
runs-on: ubuntu-latest
137+
timeout-minutes: 15
138+
steps:
139+
- uses: actions/checkout@v4
140+
with:
141+
persist-credentials: false
142+
- name: Setup Java
143+
uses: actions/setup-java@v4
144+
with:
145+
distribution: temurin
146+
java-version: 21
147+
cache: maven
148+
- name: Checkstyle
149+
run: bash ./mvnw -q checkstyle:check
150+
- name: SpotBugs
151+
run: bash ./mvnw -q -DskipTests compile spotbugs:check
152+
- name: Secret scan
153+
run: |
154+
if git grep -n --ignore-case -E 'DROPBOX_ACCESS_TOKEN[[:space:]]*=[[:space:]]*"' src/main/java src/test/java; then
155+
echo "Hardcoded credential detected"
156+
exit 1
157+
fi
158+
- name: Dependency review
159+
if: github.event_name == 'pull_request'
160+
uses: actions/dependency-review-action@v4
161+
with:
162+
fail-on-severity: moderate
163+
- name: Dependency analysis
164+
run: bash ./mvnw -q -DskipTests -DfailOnWarning=false dependency:analyze-only
165+
- name: Maven validate
166+
run: bash ./mvnw -q -DskipTests validate

.github/workflows/codeql.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: CodeQL
2+
3+
on:
4+
push:
5+
branches: [master, main]
6+
pull_request:
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
analyze:
14+
name: Analyze (CodeQL)
15+
runs-on: ubuntu-latest
16+
timeout-minutes: 20
17+
permissions:
18+
actions: read
19+
contents: read
20+
security-events: write
21+
steps:
22+
- uses: actions/checkout@v4
23+
with:
24+
persist-credentials: false
25+
- name: Setup Java
26+
uses: actions/setup-java@v4
27+
with:
28+
distribution: temurin
29+
java-version: 21
30+
- name: Initialize CodeQL
31+
uses: github/codeql-action/init@v3
32+
with:
33+
languages: java
34+
- name: Build with Maven Wrapper
35+
run: bash ./mvnw -q -DskipTests package
36+
- name: Perform CodeQL Analysis
37+
uses: github/codeql-action/analyze@v3

0 commit comments

Comments
 (0)