mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-04 23:45:07 +00:00
build custom cypress image
This commit is contained in:
parent
74965412e8
commit
bc2caaac9c
3
.github/workflows/e2e.yml
vendored
3
.github/workflows/e2e.yml
vendored
@ -34,6 +34,9 @@ jobs:
|
||||
with:
|
||||
driver: docker
|
||||
install: true
|
||||
- name: Build e2e image
|
||||
run: docker compose build
|
||||
working-directory: e2e
|
||||
- name: Test ${{ matrix.browser }}
|
||||
run: docker compose run e2e --browser ${{ matrix.browser }}
|
||||
working-directory: e2e
|
||||
|
3
.github/workflows/test-code.yml
vendored
3
.github/workflows/test-code.yml
vendored
@ -37,6 +37,9 @@ jobs:
|
||||
# As goreleaser doesn't build a dockerfile in snapshot mode, we have to build it here
|
||||
- name: Build Docker Image
|
||||
run: docker build -t zitadel:pr --file build/Dockerfile .artifacts/zitadel
|
||||
- name: Build e2e image
|
||||
run: docker compose build
|
||||
working-directory: e2e
|
||||
- name: Run E2E Tests
|
||||
run: docker compose run e2e
|
||||
working-directory: e2e
|
||||
|
@ -158,6 +158,9 @@ goreleaser build --id prod --snapshot --single-target --rm-dist --output .artifa
|
||||
# Pack the binary into a docker image
|
||||
DOCKER_BUILDKIT=1 docker build --file build/Dockerfile .artifacts/zitadel -t zitadel:local
|
||||
|
||||
# Build the e2e image
|
||||
docker compose --file ./e2e/docker-compose.yaml build
|
||||
|
||||
# Run the tests
|
||||
ZITADEL_IMAGE=zitadel:local docker compose --file ./e2e/docker-compose.yaml run e2e
|
||||
```
|
||||
@ -210,7 +213,7 @@ You can now run a local development server with live code reloading at http://lo
|
||||
To allow console access via http://localhost:4200, you have to configure the ZITADEL backend.
|
||||
|
||||
1. Navigate to http://localhost:8080/ui/console/projects.
|
||||
2. When prompted, login with *zitadel-admin@<span because="breaks the mailto"></span>zitadel.localhost* and *Password1!*.
|
||||
2. When prompted, login with *zitadel-admin@<span because="breaks the mailto"></span>zitadel.localhost* and *Password1!*
|
||||
3. Select the *ZITADEL* project.
|
||||
3. Select the *Console* application.
|
||||
4. Select *Redirect Settings*
|
||||
|
10
e2e/Dockerfile
Normal file
10
e2e/Dockerfile
Normal file
@ -0,0 +1,10 @@
|
||||
FROM cypress/included:10.3.0
|
||||
|
||||
WORKDIR dependencies
|
||||
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci --omit=dev
|
||||
|
||||
ENTRYPOINT [ "bash", "-c" ]
|
||||
|
||||
CMD [ "cp -R /dependencies/node_modules/ . && cypress run --help" ]
|
@ -33,25 +33,15 @@ services:
|
||||
networks:
|
||||
- zitadel
|
||||
|
||||
npm-install:
|
||||
image: node:18-alpine3.15
|
||||
working_dir: /e2e
|
||||
user: "$UID"
|
||||
volumes:
|
||||
- .:/e2e
|
||||
command: "npm ci --omit=dev"
|
||||
|
||||
e2e:
|
||||
image: cypress/included:10.3.0
|
||||
build:
|
||||
context: .
|
||||
depends_on:
|
||||
zitadel:
|
||||
condition: 'service_started'
|
||||
db:
|
||||
condition: 'service_healthy'
|
||||
npm-install:
|
||||
condition: 'service_completed_successfully'
|
||||
working_dir: /e2e
|
||||
user: "$UID"
|
||||
volumes:
|
||||
- .:/e2e
|
||||
network_mode: host
|
||||
|
Loading…
Reference in New Issue
Block a user