fix(tests): start server for e2e tests
This commit is contained in:
parent
b0a2e0d2b8
commit
5c638d1920
5 changed files with 9 additions and 6 deletions
|
@ -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"
|
1
.github/workflows/container-scan.yml
vendored
1
.github/workflows/container-scan.yml
vendored
|
@ -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
|
||||||
|
|
1
.github/workflows/docker-build.yml
vendored
1
.github/workflows/docker-build.yml
vendored
|
@ -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
|
||||||
|
|
10
.github/workflows/tests.yml
vendored
10
.github/workflows/tests.yml
vendored
|
@ -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
|
|
||||||
|
|
|
@ -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"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue