Stirling-PDF/.github/workflows
Ludy 9f00335258
test(core): add comprehensive unit tests for controllers, services, models, and utilities (#4160)
# Description of Changes

- **What was changed**
- **CI**: Enhanced `build.yml` to publish JaCoCo coverage and post a PR
summary comment per matrix job (Spring Security/JDK). Also archives
JaCoCo XML reports alongside existing test results.
- **Tests (new & expanded)**: Added a broad set of unit tests across
`app/common`, `app/core`, and `app/proprietary` modules, e.g.:
- Common: `ShowAdminInterfaceTest`, `UnsupportedClaimExceptionTest`,
`ExceptionUtilsTest`, `TempDirectoryTest`, etc.
- Core: `ConnectedInputStreamTest`, `ReplaceAndInvertColorFactoryTest`,
controller/model/service tests (e.g. `SettingsControllerTest`,
`ApiEndpointTest`, `FlexibleCSVWriterTest`,
`MetricsAggregatorServiceTest`, etc.).
- Proprietary: security/database/model/web tests (e.g.
`H2SQLConditionTest`, `JPATokenRepositoryImplTest`,
`AuditWebFilterTest`, `CorrelationIdFilterTest`, etc.).
- **JUnit 5 cleanup**: Consolidated assertion imports (`import static
org.junit.jupiter.api.Assertions.*`), standardized on Jupiter APIs, and
minor Mockito/Jupiter setup tweaks.
- **Fix**: `ReplaceAndInvertColorFactory` now safely returns `null` when
`replaceAndInvertOption` is `null` to avoid NPEs.
- **Testability refactor**: Broadened visibility of
`SPDFApplication#getActiveProfile(String[] args)` (from `private` to
`protected`) to enable direct unit testing.
  - **Chore**: Removed obsolete `ValidationUtil` from `app/common`.

- **Why the change was made**
  - Improve **signal in PRs** via automatic coverage summaries.
- Increase **test coverage** and reduce regressions across core and
proprietary modules.
- Eliminate a potential **NullPointerException** in color strategy
selection.
- Enable targeted testing of application startup/profile resolution
logic.

---

## Checklist

### General

- [x] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [x] I have read the [Stirling-PDF Developer
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md)
(if applicable)
- [ ] I have read the [How to add new languages to
Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md)
(if applicable)
- [x] I have performed a self-review of my own code
- [x] My changes generate no new warnings

### Documentation

- [ ] I have updated relevant docs on [Stirling-PDF's doc
repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/)
(if functionality has heavily changed)
- [ ] I have read the section [Add New Translation
Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md#add-new-translation-tags)
(for new translation tags only)

### UI Changes (if applicable)

- [ ] Screenshots or videos demonstrating the UI changes are attached
(e.g., as comments or direct attachments in the PR)

### Testing (if applicable)

- [ ] I have tested my changes locally. Refer to the [Testing
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md#6-testing)
for more details.
2025-10-31 16:58:19 +00:00
..
ai_pr_title_review.yml build(deps): bump step-security/harden-runner from 2.13.0 to 2.13.1 (#4538) 2025-09-28 21:22:40 +01:00
auto-labelerV2.yml ci: restrict workflow to main branch PRs (#4677) 2025-10-16 22:39:07 +01:00
build.yml test(core): add comprehensive unit tests for controllers, services, models, and utilities (#4160) 2025-10-31 16:58:19 +00:00
check_properties.yml ci: restrict workflow to main branch PRs (#4677) 2025-10-16 22:39:07 +01:00
codeql.yml-disabled Bump: Harden Runner from v2.10.2 to v2.10.3 (#2686) 2025-01-13 22:26:05 +00:00
dependency-review.yml build(deps): bump step-security/harden-runner from 2.13.0 to 2.13.1 (#4538) 2025-09-28 21:22:40 +01:00
licenses-update.yml build(deps): bump actions/upload-artifact from 4.6.2 to 5.0.0 (#4745) 2025-10-27 19:37:42 +00:00
manage-label.yml build(deps): bump step-security/harden-runner from 2.13.0 to 2.13.1 (#4538) 2025-09-28 21:22:40 +01:00
multiOSReleases.yml build(deps): bump softprops/action-gh-release from 2.3.4 to 2.4.1 (#4676) 2025-10-29 19:40:34 +00:00
PR-Demo-cleanup.yml build(deps): bump step-security/harden-runner from 2.13.0 to 2.13.1 (#4538) 2025-09-28 21:22:40 +01:00
PR-Demo-Comment-with-react.yml build(deps): bump actions/github-script from 7.0.1 to 8.0.0 (#4777) 2025-10-30 20:58:38 +00:00
pre_commit.yml fix(ci): 🛡️ mitigate CVE-2025-8869 by enforcing wheels-only pip installs and upgrading pinned dependencies (#4598) 2025-10-04 12:50:37 +01:00
push-docker.yml build(deps): bump sigstore/cosign-installer from 3.10.0 to 4.0.0 (#4717) 2025-10-21 13:39:31 +01:00
releaseArtifacts.yml build(deps): bump softprops/action-gh-release from 2.3.4 to 2.4.1 (#4676) 2025-10-29 19:40:34 +00:00
scorecards.yml build(deps): bump github/codeql-action from 4.30.9 to 4.31.0 (#4743) 2025-10-29 19:40:09 +00:00
stale.yml build(deps): bump actions/stale from 10.0.0 to 10.1.0 (#4603) 2025-10-06 10:47:53 +01:00
swagger.yml build(deps): bump gradle/actions from 4.4.4 to 5.0.0 (#4605) 2025-10-06 10:47:14 +01:00
sync_files.yml fix(ci): 🛡️ mitigate CVE-2025-8869 by enforcing wheels-only pip installs and upgrading pinned dependencies (#4598) 2025-10-04 12:50:37 +01:00
testdriver.yml build(deps): bump actions/setup-node from 5.0.0 to 6.0.0 (#4716) 2025-10-21 13:39:53 +01:00