mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 14:57:34 +00:00
chore: improve development for non-Linux contributors (#5288)
* test: fix e2e against console dev server * chore: get rid of network_mode host * explain e2e commands * chore: fix pipelines * fix e2e paths * fix dockerized e2e * chore: map cypress run service ports * simplify localhost * access db via compose service * access db via compose service * fix npm run open:angular and e2e:angular * docs: add empty line * chore: remove unused file * docs: update contrib --------- Co-authored-by: adlerhurst <silvan.reusser@gmail.com>
This commit is contained in:
@@ -151,6 +151,10 @@ Also, you can verify the data by running `cockroach sql --database zitadel --ins
|
||||
|
||||
As soon as you are ready to battle test your changes, run the end-to-end tests.
|
||||
|
||||
#### Running the tests with docker
|
||||
|
||||
Running the tests with docker doesn't require you to take care of other dependencies than docker and goreleaser.
|
||||
|
||||
```bash
|
||||
# Build the production binary (unit tests are executed, too)
|
||||
goreleaser build --id prod --snapshot --single-target --rm-dist --output .artifacts/zitadel/zitadel
|
||||
@@ -162,14 +166,37 @@ DOCKER_BUILDKIT=1 docker build --file build/Dockerfile .artifacts/zitadel -t zit
|
||||
(cd ./e2e && npm run lint:fix)
|
||||
|
||||
# Run the tests
|
||||
ZITADEL_IMAGE=zitadel:local docker compose --file ./e2e/docker-compose.yaml run e2e
|
||||
ZITADEL_IMAGE=zitadel:local docker compose --file ./e2e/config/host.docker.internal/docker-compose.yaml run --service-ports e2e
|
||||
```
|
||||
|
||||
When you are happy with your changes, you can cleanup your environment.
|
||||
|
||||
```bash
|
||||
# Stop and remove the docker containers for zitadel and the database
|
||||
docker compose --file ./e2e/docker-compose.yaml down
|
||||
docker compose --file ./e2e/config/host.docker.internal/docker-compose.yaml down
|
||||
```
|
||||
|
||||
#### Running the tests without docker
|
||||
|
||||
If you also make [changes to the console](#console), you can run the test suite against your locally built backend code and frontend server.
|
||||
But you will have to install the relevant node dependencies.
|
||||
|
||||
```bash
|
||||
# Install dependencies
|
||||
(cd ./e2e && npm install)
|
||||
|
||||
# Run the tests interactively
|
||||
(cd ./e2e && npm run open:golangangular)
|
||||
|
||||
# Run the tests non-interactively
|
||||
(cd ./e2e && npm run e2e:golangangular)
|
||||
```
|
||||
|
||||
When you are happy with your changes, you can cleanup your environment.
|
||||
|
||||
```bash
|
||||
# Stop and remove the docker containers for zitadel and the database
|
||||
docker compose --file ./e2e/config/host.docker.internal/docker-compose.yaml down
|
||||
```
|
||||
|
||||
### Console
|
||||
@@ -208,7 +235,7 @@ Run the database and the latest backend locally.
|
||||
cd ./console
|
||||
|
||||
# You just need the db and the zitadel services to develop the console against.
|
||||
docker compose --file ../e2e/docker-compose.yaml up --detach db zitadel
|
||||
docker compose --file ../e2e/docker-compose.yaml up --detach zitadel
|
||||
```
|
||||
|
||||
When the backend is ready, you have the latest zitadel exposed at http://localhost:8080.
|
||||
@@ -260,14 +287,21 @@ npm run lint:fix
|
||||
npm install
|
||||
|
||||
# Run all e2e tests
|
||||
npm run e2e:dev -- --headed
|
||||
npm run e2e:angular -- --headed
|
||||
```
|
||||
|
||||
You can also open the test suite interactively for fast success feedback on specific tests.
|
||||
You can also open the test suite interactively for fast feedback on specific tests.
|
||||
|
||||
```bash
|
||||
# Run tests interactively
|
||||
npm run open:dev
|
||||
npm run open:angular
|
||||
```
|
||||
|
||||
If you also make [changes to the backend code](#backend--login), you can run the test against your locally built backend code and frontend server
|
||||
|
||||
```bash
|
||||
npm run open:golangangular
|
||||
npm run e2e:golangangular
|
||||
```
|
||||
|
||||
When you are happy with your changes, you can format your code and cleanup your environment
|
||||
|
Reference in New Issue
Block a user