feat(preview-service): re introduce preview service acceptance test (#5049)

* feat: basic structure for running tests

* feat: added test to ci

* feat: added server test (wip)

* refactor: restuctured entrypoint

* feat: added supertest

* fix: missing deps

* fix: test example ci

* fix: updated default envs

* feat: debug ci

* feat: switch browser

* fix: superadmin ci

* feat: try another image

* fix: try another image with node

* fix: mr comments

* fix: ci job

* chore: workaround to push the image

* chore: try with new base image

* chore: retry

* chore: retry

* chore: retry

* chore: retry

* chore: retry

* fix: test via debug

* fix: envbar

* chore: wrapped up changes, cleaned mr

* chore: fix linter and skiped puppeteer download

* fix: removed paralelism

* fix: paralelism issues
This commit is contained in:
Daniel Gak Anagrov
2025-07-15 10:56:09 +02:00
committed by GitHub
parent c7d97eb25c
commit e6cd2ab441
14 changed files with 585 additions and 233 deletions
+25 -2
View File
@@ -198,7 +198,20 @@ jobs:
test-preview-service:
name: Preview service
runs-on: blacksmith
if: false # disabled as there is nothing to run
container:
image: ghcr.io/specklesystems/speckle-ubuntu-chromium:latest
services:
redis:
image: redis:7.2.4
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
env:
REDIS_URL: redis://redis:6379
steps:
- uses: actions/checkout@v4.2.2
- uses: useblacksmith/setup-node@v5
@@ -206,9 +219,19 @@ jobs:
node-version: 22
cache: yarn
- name: Install dependencies
run: YARN_ENABLE_HARDENED_MODE=0 PUPPETEER_SKIP_DOWNLOAD=true PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 yarn --immutable
run: YARN_ENABLE_HARDENED_MODE=0 PUPPETEER_SKIP_DOWNLOAD=true PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=0 yarn --immutable
- name: Build public packages
run: yarn build:public
- run: dbus-daemon --system &> /dev/null
- run: cp .env.test-example .env.test
working-directory: 'packages/preview-service'
- run: yarn build:frontend
working-directory: 'packages/preview-service'
- run: yarn link:frontend
working-directory: 'packages/preview-service'
- name: Run tests
run: yarn test:ci
working-directory: 'packages/preview-service'
docker-build-postgres-container:
runs-on: blacksmith