From bb3d81bfc55ce39207e5b0e71d8e3ae10832b1cd Mon Sep 17 00:00:00 2001 From: Jason Rasmussen <jrasm91@gmail.com> Date: Thu, 29 Feb 2024 09:22:25 -0500 Subject: [PATCH] chore: build tweaks (#7484) --- .dockerignore | 25 ++++++++++++------------ .github/workflows/test.yml | 2 +- server/e2e/docker-compose.server-e2e.yml | 1 + server/src/test-utils/utils.ts | 5 +++-- 4 files changed, 18 insertions(+), 15 deletions(-) diff --git a/.dockerignore b/.dockerignore index 87d63b5942..f7947202cd 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,30 +1,31 @@ .vscode/ +.github/ +.git/ design/ docker/ docs/ +e2e/ fastlane/ machine-learning/ misc/ mobile/ -server/node_modules/ +cli/coverage/ +cli/dist/ +cli/node_modules/ + +open-api/typescript-sdk/build/ +open-api/typescript-sdk/node_modules/ + server/coverage/ -server/.reverse-geocoding-dump/ +server/node_modules/ server/upload/ server/dist/ +server/www/ +server/test/assets/ web/node_modules/ web/coverage/ web/.svelte-kit web/build/ - -cli/node_modules/ -cli/.reverse-geocoding-dump/ -cli/upload/ -cli/dist/ - -e2e/ - -open-api/typescript-sdk/node_modules/ -open-api/typescript-sdk/build/ diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1f578c2800..2328b7b0f3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -203,7 +203,7 @@ jobs: run: npm ci - name: Install Playwright Browsers - run: npx playwright install --with-deps + run: npx playwright install --with-deps chromium - name: Docker build run: docker compose build diff --git a/server/e2e/docker-compose.server-e2e.yml b/server/e2e/docker-compose.server-e2e.yml index abb76ef25d..09db7ecf32 100644 --- a/server/e2e/docker-compose.server-e2e.yml +++ b/server/e2e/docker-compose.server-e2e.yml @@ -12,6 +12,7 @@ services: command: ['/usr/src/app/bin/immich-test', 'jobs'] volumes: - /usr/src/app/node_modules + - ../test/assets:/usr/src/app/test/assets:ro environment: - DB_HOSTNAME=database - DB_USERNAME=postgres diff --git a/server/src/test-utils/utils.ts b/server/src/test-utils/utils.ts index 077239d8a3..e5566f95de 100644 --- a/server/src/test-utils/utils.ts +++ b/server/src/test-utils/utils.ts @@ -6,7 +6,8 @@ import { INestApplication } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import { DateTime } from 'luxon'; import * as fs from 'node:fs'; -import path from 'node:path'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; import { EventEmitter } from 'node:stream'; import { Server } from 'node:tls'; import { EntityTarget, ObjectLiteral } from 'typeorm'; @@ -14,7 +15,7 @@ import { AppService } from '../immich/app.service'; import { AppService as MicroAppService } from '../microservices/app.service'; export const IMMICH_TEST_ASSET_PATH = process.env.IMMICH_TEST_ASSET_PATH as string; -export const IMMICH_TEST_ASSET_TEMP_PATH = path.normalize(`${IMMICH_TEST_ASSET_PATH}/temp/`); +export const IMMICH_TEST_ASSET_TEMP_PATH = join(tmpdir(), 'immich'); export const today = DateTime.fromObject({ year: 2023, month: 11, day: 3 }); export const yesterday = today.minus({ days: 1 });