From e9a142d52c9d9ac9758db7541a35d9abbb25e8b4 Mon Sep 17 00:00:00 2001 From: dominikg Date: Thu, 21 Aug 2025 16:02:04 +0200 Subject: [PATCH 1/3] feat: immich test --- .github/workflows/ecosystem-ci-from-pr.yml | 2 ++ .github/workflows/ecosystem-ci-selected.yml | 1 + .github/workflows/ecosystem-ci.yml | 1 + tests/immich.ts | 27 +++++++++++++++++++++ utils.ts | 2 +- 5 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 tests/immich.ts diff --git a/.github/workflows/ecosystem-ci-from-pr.yml b/.github/workflows/ecosystem-ci-from-pr.yml index ea529eba..e2a18b52 100644 --- a/.github/workflows/ecosystem-ci-from-pr.yml +++ b/.github/workflows/ecosystem-ci-from-pr.yml @@ -39,6 +39,7 @@ on: options: - "-" - eslint-plugin-svelte + - immich - language-tools - mdsvex - melt-ui @@ -125,6 +126,7 @@ jobs: matrix: suite: - eslint-plugin-svelte + - immich - language-tools - mdsvex - melt-ui diff --git a/.github/workflows/ecosystem-ci-selected.yml b/.github/workflows/ecosystem-ci-selected.yml index 7e63fdf5..2bc0643b 100644 --- a/.github/workflows/ecosystem-ci-selected.yml +++ b/.github/workflows/ecosystem-ci-selected.yml @@ -41,6 +41,7 @@ on: type: choice options: - eslint-plugin-svelte + - immich - language-tools - mdsvex - melt-ui diff --git a/.github/workflows/ecosystem-ci.yml b/.github/workflows/ecosystem-ci.yml index 991b0ff3..2ba285a7 100644 --- a/.github/workflows/ecosystem-ci.yml +++ b/.github/workflows/ecosystem-ci.yml @@ -50,6 +50,7 @@ jobs: matrix: suite: - eslint-plugin-svelte + - immich - language-tools - mdsvex - melt-ui diff --git a/tests/immich.ts b/tests/immich.ts new file mode 100644 index 00000000..09ae98f6 --- /dev/null +++ b/tests/immich.ts @@ -0,0 +1,27 @@ +import { runInRepo } from '../utils.ts' +import { RunOptions } from '../types.js' + +export async function test(options: RunOptions) { + await runInRepo({ + ...options, + repo: 'immich-app/immich', + branch: 'main', + overrides: { + '@sveltejs/vite-plugin-svelte': true, + '@sveltejs/vite-plugin-svelte-inspector': true, + '@sveltejs/kit': true, + }, + build: [ + 'pnpm --dir open-api/typescript-sdk build', // required for web build + 'pnpm --dir web build', + ], + beforeTest: [ + 'pnpm --filter immich-e2e exec playwright install chromium --shell-only', + 'pnpm --filter immich-e2e exec docker compose build', + ], + test: [ + //'pnpm --dir web test', // unit & component tests + 'pnpm --dir e2e test:web', // playwright e2e tests + ], + }) +} diff --git a/utils.ts b/utils.ts index d706a1fd..40569188 100644 --- a/utils.ts +++ b/utils.ts @@ -172,7 +172,7 @@ function toCommand( task: Task | Task[] | void, agent: (typeof AGENTS)[number], ): ((scripts: any) => Promise) | void { - return async (scripts: any) => { + return async (scripts = {}) => { const tasks = Array.isArray(task) ? task : [task] for (const task of tasks) { if (task == null || task === '') { From f71293e91259ed4646acddd17bd2af9d9dd0dbc0 Mon Sep 17 00:00:00 2001 From: dominikg Date: Thu, 21 Aug 2025 16:12:59 +0200 Subject: [PATCH 2/3] fix playwright install command --- tests/immich.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/immich.ts b/tests/immich.ts index 09ae98f6..27ca65e5 100644 --- a/tests/immich.ts +++ b/tests/immich.ts @@ -16,7 +16,7 @@ export async function test(options: RunOptions) { 'pnpm --dir web build', ], beforeTest: [ - 'pnpm --filter immich-e2e exec playwright install chromium --shell-only', + 'pnpm --filter immich-e2e exec playwright install chromium --only-shell', 'pnpm --filter immich-e2e exec docker compose build', ], test: [ From de78f3f6cb23d8c50573db59e3a533b061c16f0e Mon Sep 17 00:00:00 2001 From: dominikg Date: Fri, 22 Aug 2025 10:46:45 +0200 Subject: [PATCH 3/3] fix: remove immich e2e invocation, docker setup is too complex --- tests/immich.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/immich.ts b/tests/immich.ts index 27ca65e5..7db8c0d6 100644 --- a/tests/immich.ts +++ b/tests/immich.ts @@ -10,18 +10,15 @@ export async function test(options: RunOptions) { '@sveltejs/vite-plugin-svelte': true, '@sveltejs/vite-plugin-svelte-inspector': true, '@sveltejs/kit': true, + 'svelte-check': true, }, build: [ 'pnpm --dir open-api/typescript-sdk build', // required for web build 'pnpm --dir web build', ], - beforeTest: [ - 'pnpm --filter immich-e2e exec playwright install chromium --only-shell', - 'pnpm --filter immich-e2e exec docker compose build', - ], test: [ - //'pnpm --dir web test', // unit & component tests - 'pnpm --dir e2e test:web', // playwright e2e tests + 'pnpm --dir web test', // unit & component tests + 'pnpm --dir web check:svelte', // svelte-check ], }) }