mirror of
https://github.com/Unleash/unleash.git
synced 2025-08-13 13:48:59 +02:00
feat: run cypress against current branch
This commit is contained in:
parent
5ef33b56d6
commit
3b7cedb82b
24
.github/docker-compose.test.yml
vendored
24
.github/docker-compose.test.yml
vendored
@ -14,11 +14,27 @@
|
||||
services:
|
||||
# The Unleash server contains the Unleash configuration and
|
||||
# communicates with server-side SDKs and the Unleash Proxy
|
||||
unleash:
|
||||
image: 726824350591.dkr.ecr.eu-central-1.amazonaws.com/unleash-enterprise:latest
|
||||
pull_policy: "always"
|
||||
frontend:
|
||||
image: node:20-alpine
|
||||
working_dir: /app
|
||||
volumes:
|
||||
- ..:/app
|
||||
command: |
|
||||
sh -c "echo \"Building frontend\" && \
|
||||
yarn --cwd ./frontend install && \
|
||||
echo \"Waiting for Unleash to start\" && \
|
||||
npx wait-on http://unleash:4242/health && \
|
||||
echo \"Unleash is up, starting frontend\" && \
|
||||
yarn --cwd ./frontend run dev"
|
||||
ports:
|
||||
- "4242:4242"
|
||||
- "3000:3000"
|
||||
environment:
|
||||
UNLEASH_API: "http://unleash:4242/"
|
||||
unleash:
|
||||
image: unleashorg/unleash-enterprise:latest
|
||||
pull_policy: "always"
|
||||
expose:
|
||||
- "4242"
|
||||
environment:
|
||||
DATABASE_URL: "postgres://postgres:unleash@db/unleash"
|
||||
DATABASE_SSL: "false"
|
||||
|
3
.github/workflows/e2e.frontend.yaml
vendored
3
.github/workflows/e2e.frontend.yaml
vendored
@ -23,7 +23,6 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
- name: Start Unleash test instance
|
||||
run: |
|
||||
curl https://app.unleash-hosted.com/docker-login/token/${{ secrets.ECR_ENTERPRISE_TOKEN }} | docker login --username AWS --password-stdin 726824350591.dkr.ecr.eu-central-1.amazonaws.com
|
||||
docker compose -f .github/docker-compose.test.yml up -d --wait -t 90
|
||||
env:
|
||||
FRONTEND_TEST_LICENSE: ${{ secrets.FRONTEND_TEST_LICENSE }}
|
||||
@ -32,6 +31,6 @@ jobs:
|
||||
with:
|
||||
working-directory: frontend
|
||||
env: AUTH_USER=admin,AUTH_PASSWORD=unleash4all
|
||||
config: baseUrl=http://localhost:4242
|
||||
config: baseUrl=http://localhost:3000
|
||||
spec: cypress/integration/${{ matrix.test }}
|
||||
install-command: yarn --immutable
|
||||
|
@ -17,7 +17,6 @@
|
||||
"start:sandbox": "UNLEASH_API=https://sandbox.getunleash.io/ VITE_TEST_REDIRECT=true UNLEASH_BASE_PATH=/pro/ yarn run start",
|
||||
"start:sandbox:enterprise": "UNLEASH_API=https://sandbox.getunleash.io/ VITE_TEST_REDIRECT=true UNLEASH_BASE_PATH=/enterprise/ yarn run start",
|
||||
"start:demo2": "UNLEASH_API=https://sandbox.getunleash.io/ UNLEASH_BASE_PATH=/demo2/ yarn run start",
|
||||
"start:enterprise": "UNLEASH_API=https://unleash.herokuapp.com VITE_TEST_REDIRECT=true yarn run start",
|
||||
"start:demo": "UNLEASH_BASE_PATH=/demo/ UNLEASH_API=https://app.unleash-hosted.com/ yarn run start",
|
||||
"test": "NODE_OPTIONS=\"${NODE_OPTIONS:-0} --no-experimental-fetch\" vitest run",
|
||||
"test:snapshot": "NODE_OPTIONS=\"${NODE_OPTIONS:-0} --no-experimental-fetch\" yarn test -u",
|
||||
@ -30,7 +29,6 @@
|
||||
"ts:check": "tsc",
|
||||
"e2e": "NODE_OPTIONS=\"${NODE_OPTIONS:-} --no-experimental-fetch\" yarn run cypress open --config baseUrl='http://localhost:3000' --env AUTH_USER=admin,AUTH_PASSWORD=unleash4all",
|
||||
"e2e:oss": "yarn --cwd frontend run cypress run --spec \"cypress/oss/**/*.spec.ts\" --config baseUrl=\"http://localhost:${EXPOSED_PORT:-4242}\" --env AUTH_USER=admin,AUTH_PASSWORD=unleash4all",
|
||||
"e2e:heroku": "NODE_OPTIONS=\"${NODE_OPTIONS:-} --no-experimental-fetch\" yarn run cypress open --config baseUrl='https://unleash.herokuapp.com' --env AUTH_USER=admin,AUTH_PASSWORD=unleash4all",
|
||||
"gen:api": "NODE_OPTIONS=\"${NODE_OPTIONS:-} --no-experimental-fetch\" orval --config orval.config.js",
|
||||
"gen:api:demo": "NODE_OPTIONS=\"${NODE_OPTIONS:-} --no-experimental-fetch\" UNLEASH_OPENAPI_URL=https://app.unleash-hosted.com/demo/docs/openapi.json yarn run gen:api",
|
||||
"gen:api:sandbox": "NODE_OPTIONS=\"${NODE_OPTIONS:-} --no-experimental-fetch\" UNLEASH_OPENAPI_URL=https://sandbox.getunleash.io/demo2/docs/openapi.json yarn run gen:api",
|
||||
|
Loading…
Reference in New Issue
Block a user