fix(tests): start server for e2e tests
Some checks failed
container-scan / Container Scan (pull_request) Successful in 4m28s
docker-build / docker (pull_request) Successful in 6m30s
tests / Tests (pull_request) Failing after 7m57s

This commit is contained in:
Dominik 2025-05-13 10:23:58 +02:00
parent b0a2e0d2b8
commit 5c638d1920
5 changed files with 9 additions and 6 deletions

View file

@ -1,4 +1,5 @@
AUTH_SECRET="auth_secret" AUTH_SECRET="auth_secret"
AUTH_URL="http://localhost:3000" AUTH_URL="http://localhost:3000"
HOSTNAME=0.0.0.0
DATABASE_URL="file:./dev.db" DATABASE_URL="file:./dev.db"
AUTH_AUTHENTIK_ISSUER="auth_issuer" AUTH_AUTHENTIK_ISSUER="auth_issuer"

View file

@ -32,6 +32,7 @@ jobs:
path: trivy-report.json path: trivy-report.json
- name: Clean up Docker - name: Clean up Docker
if: always()
run: | run: |
docker system prune -af --filter "until=24h" docker system prune -af --filter "until=24h"
docker volume prune -f docker volume prune -f

View file

@ -65,6 +65,7 @@ jobs:
cache-to: type=registry,ref=git.dominikstahl.dev/${{ env.REPO }}:buildcache,mode=max cache-to: type=registry,ref=git.dominikstahl.dev/${{ env.REPO }}:buildcache,mode=max
- name: Clean up Docker - name: Clean up Docker
if: always()
run: | run: |
docker system prune -af --filter "until=24h" docker system prune -af --filter "until=24h"
docker volume prune -f docker volume prune -f

View file

@ -21,6 +21,11 @@ jobs:
- name: Cypress run (e2e) - name: Cypress run (e2e)
uses: https://github.com/cypress-io/github-action@v6 uses: https://github.com/cypress-io/github-action@v6
with:
build: yarn run build
start: yarn cypress:start_server
e2e: true
wait-on: 'http://localhost:3000'
- name: Cypress run (component) - name: Cypress run (component)
uses: https://github.com/cypress-io/github-action@v6 uses: https://github.com/cypress-io/github-action@v6
@ -28,8 +33,3 @@ jobs:
build: yarn run build build: yarn run build
start: yarn cypress:start_server start: yarn cypress:start_server
component: true component: true
- name: Clean up Docker
run: |
docker system prune -af --filter "until=24h"
docker volume prune -f

View file

@ -8,7 +8,7 @@
"start": "node .next/standalone/server.js", "start": "node .next/standalone/server.js",
"lint": "next lint", "lint": "next lint",
"format": "prettier --write .", "format": "prettier --write .",
"cypress:start_server": "cp .next/static/ .next/standalone/.next/ -r && dotenv -e .env.test -- node .next/standalone/server.js", "cypress:start_server": "cp public .next/standalone/ -r && cp .next/static/ .next/standalone/.next/ -r && dotenv -e .env.test -- node .next/standalone/server.js",
"cypress:open": "cypress open", "cypress:open": "cypress open",
"cypress:run": "cypress run" "cypress:run": "cypress run"
}, },