Skip to content

Commit b831924

Browse files
authored
Merge branch 'main' into refactor/file-analyzer-remove-pdfjs-dist
2 parents f0712e2 + 3fe8adc commit b831924

165 files changed

Lines changed: 9666 additions & 1627 deletions

File tree

Some content is hidden

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

.github/config/.files.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,25 @@ frontend: &frontend
5555
- scripts/type3_to_cff.py
5656
- scripts/update_type3_library.py
5757

58+
# Files that affect the Tauri desktop bundle. Gate the multi-OS Tauri build
59+
# job on changes to any of these.
60+
tauri: &tauri
61+
- frontend/src-tauri/**
62+
- frontend/src/desktop/**
63+
- frontend/tsconfig.desktop.json
64+
- frontend/package.json
65+
- frontend/package-lock.json
66+
- frontend/vite.config.ts
67+
- .github/workflows/tauri-build.yml
68+
69+
# Files that affect the AI engine (Python tool models, fixers, tests). Gate
70+
# the engine validation job on changes to engine sources or to the Java
71+
# tool surfaces it generates models from.
72+
engine: &engine
73+
- engine/**
74+
- app/(common|core|proprietary)/src/main/java/**
75+
- .github/workflows/ai-engine.yml
76+
5877
licenses-frontend: &licenses-frontend
5978
- ".github/workflows/frontend-backend-licenses-update.yml"
6079
- "frontend/package.json"

.github/dependabot.yml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ updates:
1313
- "/app/proprietary"
1414
schedule:
1515
interval: "weekly"
16+
cooldown:
17+
default-days: 7
1618
rebase-strategy: "auto"
1719

1820
- package-ecosystem: "docker"
@@ -25,12 +27,16 @@ updates:
2527
- "/docker/engine"
2628
schedule:
2729
interval: "weekly"
30+
cooldown:
31+
default-days: 7
2832
rebase-strategy: "auto"
2933

3034
- package-ecosystem: github-actions
3135
directory: /
3236
schedule:
3337
interval: weekly
38+
cooldown:
39+
default-days: 7
3440
rebase-strategy: "auto"
3541

3642
- package-ecosystem: npm
@@ -39,7 +45,84 @@ updates:
3945
- /frontend
4046
schedule:
4147
interval: "weekly"
48+
cooldown:
49+
default-days: 7
4250
rebase-strategy: "auto"
51+
groups:
52+
embedpdf:
53+
patterns:
54+
- "@embedpdf/*"
55+
mantine:
56+
patterns:
57+
- "@mantine/*"
58+
- "postcss-preset-mantine"
59+
mui:
60+
patterns:
61+
- "@mui/*"
62+
tauri-js:
63+
patterns:
64+
- "@tauri-apps/*"
65+
emotion:
66+
patterns:
67+
- "@emotion/*"
68+
react:
69+
patterns:
70+
- "react"
71+
- "react-dom"
72+
- "@types/react"
73+
- "@types/react-dom"
74+
typescript-eslint:
75+
patterns:
76+
- "@typescript-eslint/*"
77+
- "typescript-eslint"
78+
eslint:
79+
patterns:
80+
- "eslint"
81+
- "@eslint/*"
82+
vite:
83+
patterns:
84+
- "vite"
85+
- "vite-*"
86+
- "@vitejs/*"
87+
vitest:
88+
patterns:
89+
- "vitest"
90+
- "@vitest/*"
91+
testing-library:
92+
patterns:
93+
- "@testing-library/*"
94+
i18next:
95+
patterns:
96+
- "i18next"
97+
- "i18next-*"
98+
- "react-i18next"
99+
iconify:
100+
patterns:
101+
- "@iconify/*"
102+
- "@iconify-json/*"
103+
stripe:
104+
patterns:
105+
- "@stripe/*"
106+
posthog:
107+
patterns:
108+
- "@posthog/*"
109+
- "posthog-js"
110+
supabase:
111+
patterns:
112+
- "@supabase/*"
113+
dnd-kit:
114+
patterns:
115+
- "@dnd-kit/*"
116+
tailwind:
117+
patterns:
118+
- "tailwindcss"
119+
- "@tailwindcss/*"
120+
postcss:
121+
patterns:
122+
- "postcss"
123+
- "postcss-*"
124+
exclude-patterns:
125+
- "postcss-preset-mantine"
43126

44127
- package-ecosystem: cargo
45128
directories:
@@ -48,10 +131,32 @@ updates:
48131
- /frontend/src-tauri/provisioner
49132
schedule:
50133
interval: "weekly"
134+
cooldown:
135+
default-days: 7
51136
rebase-strategy: "auto"
137+
groups:
138+
tauri:
139+
patterns:
140+
- "tauri"
141+
- "tauri-build"
142+
- "tauri-plugin-*"
143+
serde:
144+
patterns:
145+
- "serde"
146+
- "serde_*"
147+
tracing:
148+
patterns:
149+
- "tracing"
150+
- "tracing-*"
151+
tokio:
152+
patterns:
153+
- "tokio"
154+
- "tokio-*"
52155

53156
- package-ecosystem: pip
54157
directory: /testing/cucumber
55158
schedule:
56159
interval: "weekly"
160+
cooldown:
161+
default-days: 7
57162
rebase-strategy: "auto"

.github/workflows/PR-Auto-Deploy-V2.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ jobs:
180180
fetch-depth: 0 # Fetch full history for commit hash detection
181181

182182
- name: Set up Docker Buildx
183-
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
183+
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
184184

185185
- name: Get version number
186186
id: versionNumber

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ jobs:
233233
STIRLING_PDF_DESKTOP_UI: false
234234

235235
- name: Set up Docker Buildx
236-
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
236+
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
237237

238238
- name: Login to Docker Hub
239239
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0

.github/workflows/ai-engine.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
name: AI Engine CI
22

3+
# Validates the Python AI engine: regenerates tool models, runs fixers,
4+
# lint, type-check, and tests. Called from build.yml on PRs and merge_group;
5+
# also runs directly on push to main as a post-merge safety net.
36
on:
7+
workflow_call:
48
push:
59
branches: [main]
6-
pull_request:
7-
merge_group:
8-
branches: [main]
910

1011
permissions:
1112
contents: read
Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
name: Backend build, format check, and coverage
2+
3+
# Reusable workflow called from build.yml. Runs the full backend build matrix
4+
# (JDK 21/25 × spring-security on/off), Spotless formatting check, JUnit, and
5+
# posts Jacoco coverage to PRs.
6+
on:
7+
workflow_call:
8+
9+
permissions:
10+
contents: read
11+
actions: read
12+
security-events: write
13+
pull-requests: write
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
jdk-version: [21, 25]
22+
spring-security: [true, false]
23+
steps:
24+
- name: Harden Runner
25+
uses: step-security/harden-runner@58077d3c7e43986b6b15fba718e8ea69e387dfcc # v2.15.1
26+
with:
27+
egress-policy: audit
28+
- name: Checkout repository
29+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
30+
31+
- name: Set up JDK ${{ matrix.jdk-version }}
32+
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
33+
with:
34+
java-version: ${{ matrix.jdk-version }}
35+
distribution: "temurin"
36+
37+
- name: Cache Gradle dependency artifacts
38+
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
39+
with:
40+
path: |
41+
~/.gradle/wrapper
42+
~/.gradle/caches/modules-2/files-2.1
43+
~/.gradle/caches/modules-2/metadata-2.*
44+
key: gradle-deps-${{ runner.os }}-jdk-${{ matrix.jdk-version }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties', '**/*.gradle', '**/*.gradle.kts', 'settings.gradle', 'settings.gradle.kts', 'gradle/libs.versions.toml') }}
45+
46+
- name: Setup Gradle
47+
uses: gradle/actions/setup-gradle@f29f5a9d7b09a7c6b29859002d29d24e1674c884 # v5.0.1
48+
with:
49+
gradle-version: 9.3.1
50+
cache-disabled: true
51+
52+
- name: Install Task
53+
uses: go-task/setup-task@3be4020d41929789a01026e0e427a4321ce0ad44 # v2.0.0
54+
- name: Check Java formatting (Spotless)
55+
if: matrix.jdk-version == 25 && matrix.spring-security == false
56+
id: spotless-check
57+
run: task backend:format:check
58+
continue-on-error: true
59+
env:
60+
MAVEN_USER: ${{ secrets.MAVEN_USER }}
61+
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
62+
MAVEN_PUBLIC_URL: ${{ secrets.MAVEN_PUBLIC_URL }}
63+
64+
- name: Comment on Java formatting failure
65+
# Only post a comment on PRs. github-script's PR helpers need an
66+
# issue/PR number, which doesn't exist on merge_group runs.
67+
if: steps.spotless-check.outcome == 'failure' && github.event_name == 'pull_request'
68+
continue-on-error: true
69+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
70+
with:
71+
script: |
72+
const marker = '<!-- java-formatting-check -->';
73+
const body = [
74+
marker,
75+
'### Java Formatting Check Failed',
76+
'',
77+
'Your code has formatting issues. Run the following command to fix them:',
78+
'',
79+
'```bash',
80+
'task backend:format',
81+
'```',
82+
'',
83+
'Then commit and push the changes.',
84+
].join('\n');
85+
const { data: comments } = await github.rest.issues.listComments({
86+
owner: context.repo.owner,
87+
repo: context.repo.repo,
88+
issue_number: context.issue.number,
89+
});
90+
const existing = comments.find(c => c.body.includes(marker));
91+
if (existing) {
92+
await github.rest.issues.updateComment({
93+
owner: context.repo.owner,
94+
repo: context.repo.repo,
95+
comment_id: existing.id,
96+
body,
97+
});
98+
} else {
99+
await github.rest.issues.createComment({
100+
owner: context.repo.owner,
101+
repo: context.repo.repo,
102+
issue_number: context.issue.number,
103+
body,
104+
});
105+
}
106+
107+
- name: Fail if Java formatting issues found
108+
if: steps.spotless-check.outcome == 'failure'
109+
run: |
110+
echo "============================================"
111+
echo " Java Formatting Check Failed"
112+
echo "============================================"
113+
echo ""
114+
echo "Your code has formatting issues."
115+
echo "Run the following command to fix them:"
116+
echo ""
117+
echo " task backend:format"
118+
echo ""
119+
echo "Then commit and push the changes."
120+
echo "============================================"
121+
exit 1
122+
123+
- name: Build with Gradle and spring security ${{ matrix.spring-security }}
124+
run: task backend:build:ci
125+
env:
126+
MAVEN_USER: ${{ secrets.MAVEN_USER }}
127+
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
128+
MAVEN_PUBLIC_URL: ${{ secrets.MAVEN_PUBLIC_URL }}
129+
DISABLE_ADDITIONAL_FEATURES: ${{ matrix.spring-security }}
130+
131+
- name: Check Test Reports Exist
132+
if: always()
133+
run: |
134+
declare -a dirs=(
135+
"app/core/build/reports/tests/"
136+
"app/core/build/test-results/"
137+
"app/common/build/reports/tests/"
138+
"app/common/build/test-results/"
139+
"app/proprietary/build/reports/tests/"
140+
"app/proprietary/build/test-results/"
141+
)
142+
for dir in "${dirs[@]}"; do
143+
if [ ! -d "$dir" ]; then
144+
echo "Missing $dir"
145+
exit 1
146+
fi
147+
done
148+
149+
- name: Upload Test Reports
150+
if: always()
151+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
152+
with:
153+
name: test-reports-jdk-${{ matrix.jdk-version }}-spring-security-${{ matrix.spring-security }}
154+
path: |
155+
app/**/build/reports/jacoco/test
156+
app/**/build/reports/tests/
157+
app/**/build/test-results/
158+
app/**/build/reports/problems/
159+
build/reports/problems/
160+
retention-days: 3
161+
if-no-files-found: warn
162+
163+
- name: Add coverage to PR with spring security ${{ matrix.spring-security }} and JDK ${{ matrix.jdk-version }}
164+
# The action only supports the pull_request event (it posts a PR comment),
165+
# so skip it for merge_group runs and workflow_dispatch.
166+
if: github.event_name == 'pull_request'
167+
id: jacoco
168+
uses: madrapps/jacoco-report@50d3aff4548aa991e6753342d9ba291084e63848 # v1.7.2
169+
with:
170+
paths: |
171+
${{ github.workspace }}/**/build/reports/jacoco/test/jacocoTestReport.xml
172+
token: ${{ secrets.GITHUB_TOKEN }}
173+
min-coverage-overall: 10
174+
min-coverage-changed-files: 0
175+
comment-type: summary

0 commit comments

Comments
 (0)