mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2026-09-03 05:10:16 +03:00
# Description of Changes This change upgrades the project from Gradle **9.6.0** to **9.6.1** across all build environments to keep the toolchain consistent and aligned. ### What was changed - Updated the Gradle Wrapper to **9.6.1**. - Updated all GitHub Actions workflows using `gradle/actions/setup-gradle` to install Gradle **9.6.1**. - Updated all Docker build stages to use the `gradle:9.6.1-jdk25` image with the corresponding pinned image digest. - Regenerated the Windows Gradle wrapper script, resulting in minor comment updates (`Gradle` → `gradlew`). ### Why the change was made - Keep the project up to date with the latest Gradle patch release. - Ensure all local, CI, and Docker build environments use the same Gradle version. - Benefit from the latest bug fixes and maintenance improvements included in Gradle 9.6.1. --- ## Checklist ### General - [ ] I have read the [Contribution Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md) - [ ] 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/devGuide/HowToAddNewLanguage.md) (if applicable) - [ ] I have performed a self-review of my own code - [ ] 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) ### Translations (if applicable) - [ ] I ran [`scripts/counter_translation.py`](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/docs/counter_translation.md) ### 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 run `task check` to verify linters, typechecks, and tests pass - [ ] I have tested my changes locally. Refer to the [Testing Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md#7-testing) for more details.
94 lines
3.5 KiB
YAML
94 lines
3.5 KiB
YAML
name: DB migration smoke test
|
|
|
|
# Boots the current Stirling-PDF JAR against H2 fixtures captured from past
|
|
# releases (v2.0.0 / v2.5.0 / v2.10.0) and verifies admin login still works.
|
|
# Catches schema changes that would break existing user databases under
|
|
# Hibernate's `ddl-auto=update` upgrade path.
|
|
|
|
on:
|
|
workflow_call:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
pick:
|
|
uses: ./.github/workflows/_runner-pick.yml
|
|
|
|
migration-test:
|
|
needs: pick
|
|
runs-on: ${{ needs.pick.outputs.use_depot == 'true' && 'depot-ubuntu-24.04-8' || 'ubuntu-latest' }}
|
|
timeout-minutes: 30
|
|
env:
|
|
DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }}
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: Checkout repository
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
- name: Set up JDK 25
|
|
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
|
|
with:
|
|
java-version: 25
|
|
distribution: temurin
|
|
|
|
- name: Cache Gradle dependency artifacts
|
|
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
|
with:
|
|
path: |
|
|
~/.gradle/wrapper
|
|
~/.gradle/caches/modules-2/files-2.1
|
|
~/.gradle/caches/modules-2/metadata-2.*
|
|
key: gradle-deps-${{ runner.os }}-jdk-25-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties', '**/*.gradle', '**/*.gradle.kts', 'settings.gradle', 'settings.gradle.kts', 'gradle/libs.versions.toml') }}
|
|
|
|
- name: Setup Gradle
|
|
uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0
|
|
with:
|
|
gradle-version: 9.6.1
|
|
cache-disabled: true
|
|
|
|
# No `-PnoSpotless` here yet because the upstream cache layer matches the
|
|
# backend build's; reuse keeps cold-cache cost identical.
|
|
- name: Build Stirling-PDF JAR
|
|
env:
|
|
MAVEN_USER: ${{ secrets.MAVEN_USER }}
|
|
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
|
|
MAVEN_PUBLIC_URL: ${{ secrets.MAVEN_PUBLIC_URL }}
|
|
run: ./gradlew :stirling-pdf:bootJar -PnoSpotless --no-daemon
|
|
|
|
- name: Locate built JAR
|
|
id: jar
|
|
run: |
|
|
jar=$(find app/core/build/libs -maxdepth 1 -name 'Stirling-PDF*.jar' -o -name 'stirling-pdf*.jar' 2>/dev/null \
|
|
| grep -vE '(-plain|-sources)\.jar$' | head -n 1)
|
|
if [[ -z "$jar" ]]; then
|
|
echo "::error::No JAR under app/core/build/libs"
|
|
ls -lah app/core/build/libs || true
|
|
exit 1
|
|
fi
|
|
# Absolute path - the migration script pushd's into a temp workdir
|
|
# before invoking java, which would dangle a relative path.
|
|
jar=$(realpath "$jar")
|
|
echo "path=$jar" >> "$GITHUB_OUTPUT"
|
|
echo "Built JAR: $jar"
|
|
|
|
- name: Run migration smoke test
|
|
env:
|
|
STIRLING_JAR: ${{ steps.jar.outputs.path }}
|
|
run: bash scripts/db-migration/run-migration-test.sh
|
|
|
|
- name: Upload app logs on failure
|
|
if: failure()
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
with:
|
|
name: db-migration-app-logs
|
|
# Path matches the preserved workdir in run-migration-test.sh -
|
|
# only failing fixtures leave a directory behind.
|
|
path: /tmp/stirling-migration-failed-*/app.log
|
|
retention-days: 7
|
|
if-no-files-found: warn
|