Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

web: e2e #7063

Merged
merged 1 commit into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,7 @@ cli/.reverse-geocoding-dump/
cli/upload/
cli/dist/

e2e/

open-api/typescript-sdk/node_modules/
open-api/typescript-sdk/build/
28 changes: 28 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,34 @@ jobs:
run: npm run test:cov
if: ${{ !cancelled() }}

web-e2e-tests:
name: Web (e2e)
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./e2e

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Run setup typescript-sdk
run: npm ci && npm run build
working-directory: ./open-api/typescript-sdk

- name: Install dependencies
run: npm ci

- name: Install Playwright Browsers
run: npx playwright install --with-deps

- name: Docker build
run: docker compose -f docker/docker-compose.e2e.yml build
working-directory: ./

- name: Run e2e tests
run: npx playwright test

mobile-unit-tests:
name: Mobile
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ server-e2e-jobs:
server-e2e-api:
npm run e2e:api --prefix server

.PHONY: e2e
e2e:
docker compose -f ./docker/docker-compose.e2e.yml up --build -V --remove-orphans

prod:
docker compose -f ./docker/docker-compose.prod.yml up --build -V --remove-orphans

Expand Down
49 changes: 49 additions & 0 deletions docker/docker-compose.e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
version: "3.8"

name: immich-e2e

x-server-build: &server-common
image: immich-server:latest
build:
context: ../
dockerfile: server/Dockerfile
environment:
- DB_HOSTNAME=database
- DB_USERNAME=postgres
- DB_PASSWORD=postgres
- DB_DATABASE_NAME=immich
- REDIS_HOSTNAME=redis
volumes:
- upload:/usr/src/app/upload
depends_on:
- redis
- database

services:
immich-server:
command: [ "./start.sh", "immich" ]
<<: *server-common
ports:
- 2283:3001

immich-microservices:
command: [ "./start.sh", "microservices" ]
<<: *server-common


redis:
image: redis:6.2-alpine@sha256:51d6c56749a4243096327e3fb964a48ed92254357108449cb6e23999c37773c5
restart: always

database:
image: tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: immich
ports:
- 5432:5432

volumes:
model-cache:
upload:
5 changes: 5 additions & 0 deletions e2e/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules/
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
Loading
Loading