Skip to content

Commit 1ebd6f0

Browse files
authored
Merge branch 'main' into prettier-2-electric-boogaloo
2 parents 645b6d4 + 702f4e5 commit 1ebd6f0

39 files changed

+1161
-1291
lines changed

.github/config/.files.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ frontend: &frontend
4646
- testing/**
4747
- docker/**
4848
- scripts/translations/*.py
49-
- scripts/build-tauri-jlink.bat
50-
- scripts/build-tauri-jlink.sh
49+
- .taskfiles/desktop.yml
5150
- scripts/convert_cff_to_ttf.py
5251
- scripts/harvest_type3_fonts.py
5352
- scripts/ignore_translation.toml

.github/pull_request_template.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Closes #(issue_number)
1717
### General
1818

1919
- [ ] I have read the [Contribution Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
20-
- [ ] I have read the [Stirling-PDF Developer Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md) (if applicable)
20+
- [ ] I have read the [Stirling-PDF Developer Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md) (if applicable)
2121
- [ ] 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)
2222
- [ ] I have performed a self-review of my own code
2323
- [ ] My changes generate no new warnings
@@ -37,4 +37,5 @@ Closes #(issue_number)
3737

3838
### Testing (if applicable)
3939

40-
- [ ] 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.
40+
- [ ] I have run `task check` to verify linters, typechecks, and tests pass
41+
- [ ] 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.

.github/workflows/PR-Demo-Comment-with-react.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,14 +161,16 @@ jobs:
161161
with:
162162
gradle-version: 9.3.1
163163

164+
- name: Install Task
165+
uses: go-task/setup-task@3be4020d41929789a01026e0e427a4321ce0ad44 # v2.0.0
164166
- name: Run Gradle Command
165167
run: |
166168
if [ "${{ needs.check-comment.outputs.disable_security }}" == "true" ]; then
167169
export DISABLE_ADDITIONAL_FEATURES=true
168170
else
169171
export DISABLE_ADDITIONAL_FEATURES=false
170172
fi
171-
./gradlew build
173+
task backend:build
172174
env:
173175
MAVEN_USER: ${{ secrets.MAVEN_USER }}
174176
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}

.github/workflows/ai-engine.yml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ jobs:
1111
permissions:
1212
contents: read
1313
pull-requests: write
14-
defaults:
15-
run:
16-
working-directory: engine
17-
1814
steps:
1915
- name: Checkout code
2016
uses: actions/checkout@v4
@@ -24,12 +20,12 @@ jobs:
2420
with:
2521
enable-cache: true
2622

27-
- name: Install dependencies
28-
run: make install
23+
- name: Install Task
24+
uses: go-task/setup-task@3be4020d41929789a01026e0e427a4321ce0ad44 # v2.0.0
2925

3026
- name: Run fixers
3127
# Ignore errors here because we're going to add comments for them in the following steps before actually failing
32-
run: make fix || true
28+
run: task engine:fix || true
3329

3430
- name: Check for fixer changes
3531
id: fixer_changes
@@ -60,24 +56,24 @@ jobs:
6056
owner: context.repo.owner,
6157
repo: context.repo.repo,
6258
issue_number: context.issue.number,
63-
body: "The Python code in your PR has formatting/linting issues. Consider running `make fix` locally or setting up your editor's Ruff integration to auto-format and lint your files as you go, or commit the suggested changes on this PR.",
59+
body: "The Python code in your PR has formatting/linting issues. Consider running `task engine:fix` locally or setting up your editor's Ruff integration to auto-format and lint your files as you go, or commit the suggested changes on this PR.",
6460
});
6561
6662
- name: Verify fixer changes are committed
6763
if: steps.fixer_changes.outputs.changed == 'true'
6864
run: |
6965
if ! git diff --exit-code; then
7066
echo "Fixes are out of date."
71-
echo "Apply the reviewdog suggestions or run 'make fix' from engine/ and commit the updated files."
67+
echo "Apply the reviewdog suggestions or run 'task engine:fix' from the repo root and commit the updated files."
7268
git --no-pager diff --stat
7369
exit 1
7470
fi
7571
7672
- name: Run linting
77-
run: make lint
73+
run: task engine:lint
7874

7975
- name: Run type checking
80-
run: make typecheck
76+
run: task engine:typecheck
8177

8278
- name: Run tests
83-
run: make test
79+
run: task engine:test

.github/workflows/build.yml

Lines changed: 60 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,12 @@ jobs:
8585
gradle-version: 9.3.1
8686
cache-disabled: true
8787

88+
- name: Install Task
89+
uses: go-task/setup-task@3be4020d41929789a01026e0e427a4321ce0ad44 # v2.0.0
8890
- name: Check Java formatting (Spotless)
8991
if: matrix.jdk-version == 25 && matrix.spring-security == false
9092
id: spotless-check
91-
run: ./gradlew spotlessCheck
93+
run: task backend:format:check
9294
continue-on-error: true
9395
env:
9496
MAVEN_USER: ${{ secrets.MAVEN_USER }}
@@ -97,6 +99,7 @@ jobs:
9799

98100
- name: Comment on Java formatting failure
99101
if: steps.spotless-check.outcome == 'failure'
102+
continue-on-error: true
100103
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
101104
with:
102105
script: |
@@ -108,7 +111,7 @@ jobs:
108111
'Your code has formatting issues. Run the following command to fix them:',
109112
'',
110113
'```bash',
111-
'./gradlew spotlessApply',
114+
'task backend:format',
112115
'```',
113116
'',
114117
'Then commit and push the changes.',
@@ -137,10 +140,22 @@ jobs:
137140
138141
- name: Fail if Java formatting issues found
139142
if: steps.spotless-check.outcome == 'failure'
140-
run: exit 1
143+
run: |
144+
echo "============================================"
145+
echo " Java Formatting Check Failed"
146+
echo "============================================"
147+
echo ""
148+
echo "Your code has formatting issues."
149+
echo "Run the following command to fix them:"
150+
echo ""
151+
echo " task backend:format"
152+
echo ""
153+
echo "Then commit and push the changes."
154+
echo "============================================"
155+
exit 1
141156
142157
- name: Build with Gradle and spring security ${{ matrix.spring-security }}
143-
run: ./gradlew build -PnoSpotless
158+
run: task backend:build:ci
144159
env:
145160
MAVEN_USER: ${{ secrets.MAVEN_USER }}
146161
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
@@ -224,8 +239,10 @@ jobs:
224239
gradle-version: 9.3.1
225240
cache-disabled: true
226241

242+
- name: Install Task
243+
uses: go-task/setup-task@3be4020d41929789a01026e0e427a4321ce0ad44 # v2.0.0
227244
- name: Generate OpenAPI documentation
228-
run: ./gradlew :stirling-pdf:generateOpenApiDocs
245+
run: task backend:swagger
229246
env:
230247
MAVEN_USER: ${{ secrets.MAVEN_USER }}
231248
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
@@ -258,29 +275,26 @@ jobs:
258275
node-version: "22"
259276
cache: "npm"
260277
cache-dependency-path: frontend/package-lock.json
261-
- name: Install frontend dependencies
262-
run: cd frontend && npm ci
263-
- name: Check TypeScript formatting (Prettier)
264-
id: prettier-check
265-
run: cd frontend && npm run format:check
278+
- name: Install Task
279+
uses: go-task/setup-task@3be4020d41929789a01026e0e427a4321ce0ad44 # v2.0.0
280+
- name: Quality-check frontend
281+
id: frontend-check
282+
run: task frontend:check:all
283+
continue-on-error: true
284+
- name: Comment on frontend check failure
285+
if: steps.frontend-check.outcome == 'failure'
266286
continue-on-error: true
267-
- name: Comment on TypeScript formatting failure
268-
if: steps.prettier-check.outcome == 'failure'
269287
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
270288
with:
271289
script: |
272-
const marker = '<!-- typescript-formatting-check -->';
290+
const marker = '<!-- frontend-check -->';
273291
const body = [
274292
marker,
275-
'### TypeScript Formatting Check Failed',
293+
'### Frontend Check Failed',
276294
'',
277-
'Your code has formatting issues. Run the following command to fix them:',
295+
'There are issues with your frontend code that will need to be fixed before they can be merged in.',
278296
'',
279-
'```bash',
280-
'cd frontend && npm run fix',
281-
'```',
282-
'',
283-
'Then commit and push the changes.',
297+
'Run `task frontend:fix` to auto-fix what can be fixed automatically, then run `task frontend:check:all` to see what still needs fixing manually.',
284298
].join('\n');
285299
const { data: comments } = await github.rest.issues.listComments({
286300
owner: context.repo.owner,
@@ -303,17 +317,21 @@ jobs:
303317
body,
304318
});
305319
}
306-
- name: Fail if TypeScript formatting issues found
307-
if: steps.prettier-check.outcome == 'failure'
308-
run: exit 1
309-
- name: Type-check frontend
310-
run: cd frontend && npm run prep && npm run typecheck:all
311-
- name: Lint frontend
312-
run: cd frontend && npm run lint
313-
- name: Build frontend
314-
run: cd frontend && npm run build
315-
- name: Run frontend tests
316-
run: cd frontend && npm run test -- --run
320+
- name: Fail if frontend check failed
321+
if: steps.frontend-check.outcome == 'failure'
322+
run: |
323+
echo "============================================"
324+
echo " Frontend Check Failed"
325+
echo "============================================"
326+
echo ""
327+
echo "There are issues with your frontend code that"
328+
echo "will need to be fixed before they can be merged in."
329+
echo ""
330+
echo "Run 'task frontend:fix' to auto-fix what can be"
331+
echo "fixed automatically, then run 'task frontend:check:all'"
332+
echo "to see what still needs fixing manually."
333+
echo "============================================"
334+
exit 1
317335
- name: Upload frontend build artifacts
318336
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
319337
with:
@@ -338,14 +356,12 @@ jobs:
338356
node-version: "22"
339357
cache: "npm"
340358
cache-dependency-path: frontend/package-lock.json
341-
- name: Install frontend dependencies
342-
run: cd frontend && npm ci
343-
- name: Generate icons
344-
run: cd frontend && node scripts/generate-icons.js
359+
- name: Install Task
360+
uses: go-task/setup-task@3be4020d41929789a01026e0e427a4321ce0ad44 # v2.0.0
345361
- name: Install Playwright (chromium only)
346-
run: cd frontend && npx playwright install chromium --with-deps
362+
run: task frontend:test:e2e:install -- chromium
347363
- name: Run E2E tests (chromium)
348-
run: cd frontend && npx playwright test --project=chromium
364+
run: task frontend:test:e2e -- --project=chromium
349365
- name: Upload Playwright report
350366
if: always()
351367
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
@@ -388,13 +404,10 @@ jobs:
388404
gradle-version: 9.3.1
389405
cache-disabled: true
390406

391-
- name: check the licenses for compatibility
392-
# NOTE: --no-parallel is intentional here. Running the checkLicense task in parallel with other
393-
# Gradle tasks has been observed to cause intermittent failures with the dependency license
394-
# checking plugin on this Gradle version. Disabling parallel execution trades some build speed
395-
# for more reliable, deterministic license checks. If upgrading Gradle or the plugin, consider
396-
# re-evaluating whether this flag is still required before removing it.
397-
run: ./gradlew checkLicense --no-parallel
407+
- name: Install Task
408+
uses: go-task/setup-task@3be4020d41929789a01026e0e427a4321ce0ad44 # v2.0.0
409+
- name: Check licenses for compatibility
410+
run: task backend:licenses:check
398411
env:
399412
MAVEN_USER: ${{ secrets.MAVEN_USER }}
400413
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
@@ -589,8 +602,10 @@ jobs:
589602
gradle-version: 9.3.1
590603
cache-disabled: true
591604

605+
- name: Install Task
606+
uses: go-task/setup-task@3be4020d41929789a01026e0e427a4321ce0ad44 # v2.0.0
592607
- name: Build application
593-
run: ./gradlew build
608+
run: task backend:build
594609
env:
595610
MAVEN_USER: ${{ secrets.MAVEN_USER }}
596611
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}

.github/workflows/frontend-backend-licenses-update.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,13 @@ jobs:
8989
NPM_CONFIG_IGNORE_SCRIPTS: "true"
9090
run: npm ci --ignore-scripts --audit=false --fund=false
9191

92+
- name: Install Task
93+
uses: go-task/setup-task@3be4020d41929789a01026e0e427a4321ce0ad44 # v2.0.0
9294
- name: Generate frontend license report (internal PR)
9395
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false
94-
working-directory: frontend
9596
env:
9697
PR_IS_FORK: "false"
97-
run: npm run generate-licenses
98+
run: task frontend:licenses:generate
9899

99100
- name: Generate frontend license report (fork PRs, pinned)
100101
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == true
@@ -341,15 +342,11 @@ jobs:
341342
with:
342343
gradle-version: 9.3.1
343344

345+
- name: Install Task
346+
uses: go-task/setup-task@3be4020d41929789a01026e0e427a4321ce0ad44 # v2.0.0
344347
- name: Check licenses and generate report
345348
id: license-check
346-
run: |
347-
# NOTE: --no-parallel is intentional here. Running the license-checking tasks in parallel has
348-
# previously caused intermittent concurrency issues in CI (e.g. flaky failures in the license
349-
# plugin/Gradle when multiple projects are evaluated concurrently). Disabling parallelism trades
350-
# some build speed for more reliable license reports. If the underlying issues are resolved in
351-
# future Gradle or plugin versions, this flag can be reconsidered.
352-
./gradlew checkLicense generateLicenseReport --no-parallel || echo "LICENSE_CHECK_FAILED=true" >> $GITHUB_ENV
349+
run: task backend:licenses:generate || echo "LICENSE_CHECK_FAILED=true" >> $GITHUB_ENV
353350
env:
354351
MAVEN_USER: ${{ secrets.MAVEN_USER }}
355352
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}

.github/workflows/multiOSReleases.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ jobs:
6363
with:
6464
gradle-version: 9.3.1
6565

66+
- name: Install Task
67+
uses: go-task/setup-task@3be4020d41929789a01026e0e427a4321ce0ad44 # v2.0.0
6668
- name: Get version number
6769
id: versionNumber
6870
run: |
69-
echo "Running gradlew printVersion..."
70-
./gradlew printVersion --quiet
7171
VERSION=$(./gradlew printVersion --quiet | tail -1)
7272
echo "Extracted version: $VERSION"
7373
echo "versionNumber=$VERSION" >> $GITHUB_OUTPUT
@@ -295,8 +295,7 @@ jobs:
295295
DISABLE_ADDITIONAL_FEATURES: true
296296

297297
- name: Install frontend dependencies
298-
working-directory: ./frontend
299-
run: npm ci
298+
run: task frontend:install
300299

301300
# DigiCert KeyLocker Setup (Cloud HSM)
302301
- name: Setup DigiCert KeyLocker

.github/workflows/nightly.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,13 @@ jobs:
3232
cache: "npm"
3333
cache-dependency-path: frontend/package-lock.json
3434

35-
- name: Install frontend dependencies
36-
run: cd frontend && npm ci
37-
38-
- name: Generate icons
39-
run: cd frontend && node scripts/generate-icons.js
40-
35+
- name: Install Task
36+
uses: go-task/setup-task@3be4020d41929789a01026e0e427a4321ce0ad44 # v2.0.0
4137
- name: Install all Playwright browsers
42-
run: cd frontend && npx playwright install --with-deps
38+
run: task frontend:test:e2e:install
4339

4440
- name: Run E2E tests (all browsers)
45-
run: cd frontend && npx playwright test
41+
run: task frontend:test:e2e
4642

4743
- name: Upload Playwright report
4844
if: always()

.github/workflows/push-docker.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ jobs:
6464
id: buildx
6565
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
6666

67+
- name: Install Task
68+
uses: go-task/setup-task@3be4020d41929789a01026e0e427a4321ce0ad44 # v2.0.0
6769
- name: Get version number
6870
id: versionNumber
6971
run: echo "versionNumber=$(./gradlew printVersion --quiet | tail -1)" >> $GITHUB_OUTPUT

.github/workflows/swagger.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ jobs:
5656
SWAGGERHUB_API_KEY: ${{ secrets.SWAGGERHUB_API_KEY }}
5757
SWAGGERHUB_USER: "Frooodle"
5858

59+
- name: Install Task
60+
uses: go-task/setup-task@3be4020d41929789a01026e0e427a4321ce0ad44 # v2.0.0
5961
- name: Get version number
6062
id: versionNumber
6163
run: echo "versionNumber=$(./gradlew printVersion --quiet | tail -1)" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)