From 387ae5934dfe976b95f58f292f6babfa5ae27040 Mon Sep 17 00:00:00 2001 From: Ludy Date: Thu, 19 Jun 2025 16:40:26 +0200 Subject: [PATCH 1/2] chore: expand GitHub label configuration with size, language, and workflow labels (#3778) # Description of Changes Please provide a summary of the changes, including: - Descriptions were added for several labels to improve automation compatibility and clarity. - These enhancements facilitate clearer PR management and allow for better filtering and automation via GitHub Actions or other tooling. --- ## 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/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/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/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/DeveloperGuide.md#6-testing) for more details. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/labels.yml | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/.github/labels.yml b/.github/labels.yml index 3a5973003..b7f5642e7 100644 --- a/.github/labels.yml +++ b/.github/labels.yml @@ -137,4 +137,41 @@ description: "Reverts a previous commit" - name: "style" color: "FFA500" - description: "Changes that do not affect the meaning of the code (formatting, etc.)" \ No newline at end of file + description: "Changes that do not affect the meaning of the code (formatting, etc.)" +- name: "admin" + color: "195055" +- name: "codex" + color: "ededed" + description: null +- name: "Github" + color: "0052CC" +- name: "github_actions" + color: "000000" + description: "Pull requests that update GitHub Actions code" +- name: "needs-changes" + color: "A65A86" +- name: "on-hold" + color: "2526F9" +- name: "python" + color: "2b67c6" + description: "Pull requests that update Python code" +- name: "size:L" + color: "eb9500" + description: "This PR changes 100-499 lines ignoring generated files." +- name: "size:M" + color: "ebb800" + description: "This PR changes 30-99 lines ignoring generated files." +- name: "size:S" + color: "77b800" + description: "This PR changes 10-29 lines ignoring generated files." +- name: "size:XL" + color: "ff823f" + description: "This PR changes 500-999 lines ignoring generated files." +- name: "size:XS" + color: "00ff00" + description: "This PR changes 0-9 lines ignoring generated files." +- name: "size:XXL" + color: "ffb8b8" + description: "This PR changes 1000+ lines ignoring generated files." +- name: "to research" + color: "FBCA04" From 5a8162ff608503658e8122de2adf18b023ea6c5f Mon Sep 17 00:00:00 2001 From: Ludy Date: Thu, 19 Jun 2025 16:42:16 +0200 Subject: [PATCH 2/2] ci: add matrix strategy for spring-security and improve test report check logic (#3768) # Description of Changes - Introduced a new matrix axis `spring-security` in the GitHub Actions workflow to run tests with and without Spring Security features enabled. - Removed duplicated build steps and unified them into a single Gradle task using the matrix value. - Refactored the test report check step to dynamically iterate over expected directories using a Bash array, improving maintainability and readability. - Ensured test report artifacts are uploaded regardless of test success, with clearer naming and a fallback if files are missing. --- ## 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/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/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/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/DeveloperGuide.md#6-testing) for more details. --- .github/workflows/build.yml | 51 ++++++++++++++----------------------- 1 file changed, 19 insertions(+), 32 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7ead7cb6f..098dd3725 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,6 +21,7 @@ jobs: fail-fast: false matrix: jdk-version: [17, 21] + spring-security: [true, false] steps: - name: Harden Runner @@ -37,56 +38,41 @@ jobs: java-version: ${{ matrix.jdk-version }} distribution: "temurin" - - name: Build with Gradle and no spring security + - name: Build with Gradle and spring security ${{ matrix.spring-security }} run: ./gradlew clean build env: - DISABLE_ADDITIONAL_FEATURES: true - - - name: Build with Gradle and with spring security - run: ./gradlew clean build - env: - DISABLE_ADDITIONAL_FEATURES: false + DISABLE_ADDITIONAL_FEATURES: ${{ matrix.spring-security }} - name: Check Test Reports Exist id: check-reports if: always() run: | + declare -a dirs=( + "stirling-pdf/build/reports/tests/" + "stirling-pdf/build/test-results/" + "common/build/reports/tests/" + "common/build/test-results/" + "proprietary/build/reports/tests/" + "proprietary/build/test-results/" + ) missing_reports=() - - # Check for required test report directories - if [ ! -d "stirling-pdf/build/reports/tests/" ]; then - missing_reports+=("stirling-pdf/build/reports/tests/") - fi - if [ ! -d "stirling-pdf/build/test-results/" ]; then - missing_reports+=("stirling-pdf/build/test-results/") - fi - if [ ! -d "common/build/reports/tests/" ]; then - missing_reports+=("common/build/reports/tests/") - fi - if [ ! -d "common/build/test-results/" ]; then - missing_reports+=("common/build/test-results/") - fi - if [ ! -d "proprietary/build/reports/tests/" ]; then - missing_reports+=("proprietary/build/reports/tests/") - fi - if [ ! -d "proprietary/build/test-results/" ]; then - missing_reports+=("proprietary/build/test-results/") - fi - - # Fail if any required reports are missing + for dir in "${dirs[@]}"; do + if [ ! -d "$dir" ]; then + missing_reports+=("$dir") + fi + done if [ ${#missing_reports[@]} -gt 0 ]; then echo "ERROR: The following required test report directories are missing:" printf '%s\n' "${missing_reports[@]}" exit 1 fi - echo "All required test report directories are present" - name: Upload Test Reports - if: steps.check-reports.outcome == 'success' + if: always() uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: - name: test-reports-jdk-${{ matrix.jdk-version }} + name: test-reports-jdk-${{ matrix.jdk-version }}-spring-security-${{ matrix.spring-security }} path: | stirling-pdf/build/reports/tests/ stirling-pdf/build/test-results/ @@ -98,6 +84,7 @@ jobs: proprietary/build/test-results/ proprietary/build/reports/problems/ retention-days: 3 + if-no-files-found: warn check-licence: runs-on: ubuntu-latest