Skip to content

Commit cd0647f

Browse files
committed
improvement(ci): keep library media on the landing acceptance path
1 parent 6f5ab24 commit cd0647f

2 files changed

Lines changed: 54 additions & 10 deletions

File tree

‎apps/sim/turbo.json‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"!app/(landing)/**",
1010
"!app/api/**",
1111
"!content/**",
12+
"!public/library/**",
1213
"!tools/**",
1314
"!providers/**",
1415
"!blocks/**",
@@ -151,7 +152,12 @@
151152
},
152153
"ci:e2e-seo": {
153154
"dependsOn": ["ci:server", "ci:ui"],
154-
"inputs": ["app/(landing)/**", "content/**", "scripts/test-landing-seo-e2e.ts"],
155+
"inputs": [
156+
"app/(landing)/**",
157+
"content/**",
158+
"public/library/**",
159+
"scripts/test-landing-seo-e2e.ts"
160+
],
155161
"cache": false
156162
},
157163
"ci:desktop-live": {

‎scripts/ci-changes.test.ts‎

Lines changed: 47 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,44 @@ describe('CI task attribution through real Turborepo', () => {
181181
build: true,
182182
})
183183
})
184+
it.each([
185+
['apps/sim/public/library/example/cover.jpg'],
186+
['apps/sim/content/library/example/index.mdx', 'apps/sim/public/library/example/cover.jpg'],
187+
])('keeps library media on the rendering and SEO path: %j', (...files) => {
188+
const plan = classifyFiles(files)
189+
expect(plan.fallback).toBeUndefined()
190+
expect(groups(plan)).toEqual(['seo'])
191+
expect(plan.docsGroups).toEqual([])
192+
expect(plan.flags).toMatchObject({
193+
integration: false,
194+
desktop_live: false,
195+
production: false,
196+
test_app: true,
197+
build: true,
198+
e2e_build: true,
199+
})
200+
})
201+
it.each(['delete', 'move'])('keeps SEO coverage when library media is removed: %s', (change) => {
202+
const { repo } = fixture()
203+
const media = 'apps/sim/public/library/example/cover.jpg'
204+
write(repo, media, 'fixture media')
205+
git(repo, 'add', '-A')
206+
git(repo, 'commit', '--quiet', '-m', 'media base')
207+
const base = git(repo, 'rev-parse', 'HEAD')
208+
if (change === 'delete') git(repo, 'rm', media)
209+
else git(repo, 'mv', media, 'apps/sim/public/library/example/renamed.jpg')
210+
git(repo, 'commit', '--quiet', '-m', change)
211+
const plan = classify(repo, base)
212+
expect(plan.fallback).toBeUndefined()
213+
expect(groups(plan)).toEqual(['seo'])
214+
expect(plan.flags).toMatchObject({
215+
build: true,
216+
e2e_build: true,
217+
integration: false,
218+
desktop_live: false,
219+
docs: false,
220+
})
221+
})
184222
it.each([
185223
'apps/sim/app/workspace/[workspaceId]/upgrade/components/comparison-table/comparison-data.ts',
186224
'apps/sim/providers/models.ts',
@@ -344,15 +382,15 @@ describe('CI task attribution through real Turborepo', () => {
344382
build: true,
345383
})
346384
})
347-
it('keeps unknown app modules and non-code fixtures in the shared runtime boundary', () => {
348-
for (const path of [
349-
'apps/sim/new-domain/feature.ts',
350-
'apps/sim/tools/service/__fixtures__/README.md',
351-
]) {
352-
const plan = classifyFiles([path])
353-
expect(plan.fallback).toBeUndefined()
354-
expect(plan.flags).toMatchObject({ integration: true, desktop_live: true, e2e_build: true })
355-
}
385+
it.each([
386+
'apps/sim/new-domain/feature.ts',
387+
'apps/sim/public/new-domain/config.json',
388+
'apps/sim/public/favicon/favicon.ico',
389+
'apps/sim/tools/service/__fixtures__/README.md',
390+
])('keeps unclassified runtime files in the shared boundary: %s', (path) => {
391+
const plan = classifyFiles([path])
392+
expect(plan.fallback).toBeUndefined()
393+
expect(plan.flags).toMatchObject({ integration: true, desktop_live: true, e2e_build: true })
356394
})
357395
it.each([
358396
'.github/workflows/checks.yml',

0 commit comments

Comments
 (0)