mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 03:57:32 +00:00
simplify
This commit is contained in:
39
.devcontainer/base/commands/login-integration.post-attach.sh
Executable file
39
.devcontainer/base/commands/login-integration.post-attach.sh
Executable file
@@ -0,0 +1,39 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$FAIL_COMMANDS_ON_ERRORS" == "true" ]; then
|
||||
set -e
|
||||
fi
|
||||
|
||||
echo
|
||||
echo
|
||||
echo
|
||||
echo -e "THANKS FOR CONTRIBUTING TO ZITADEL 🚀"
|
||||
echo
|
||||
echo "Your dev container is configured for fixing login integration tests."
|
||||
echo "The login is running in a separate container with the same configuration."
|
||||
echo "It calls the mock-zitadel container which provides a mocked Zitadel gRPC API."
|
||||
echo
|
||||
echo "Also the test suite is configured correctly."
|
||||
echo "For example, run a single test file:"
|
||||
echo "pnpm cypress run --spec integration/integration/login.cy.ts"
|
||||
echo
|
||||
echo "You can also run the test interactively."
|
||||
echo "However, this is only possible from outside the dev container."
|
||||
echo "On your host machine, run:"
|
||||
echo "cd apps/login"
|
||||
echo "pnpm cypress open"
|
||||
echo
|
||||
echo "If you want to change the login code, you can replace the login container by a hot reloading dev server."
|
||||
echo "docker stop login-integration"
|
||||
echo "pnpm turbo dev"
|
||||
echo "Navigate to the page you want to fix, for example:"
|
||||
echo "http://localhost:3001/ui/v2/login/verify?userId=221394658884845598&code=abc"
|
||||
echo "Change some code and reload the page for instant feedback."
|
||||
echo
|
||||
echo "When you are done, make sure all integration tests pass:"
|
||||
echo "pnpm cypress run"
|
||||
echo
|
||||
|
||||
if [ "$FAIL_COMMANDS_ON_ERRORS" != "true" ]; then
|
||||
exit 0
|
||||
fi
|
18
.devcontainer/base/commands/login-integration.update-content.sh
Executable file
18
.devcontainer/base/commands/login-integration.update-content.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$FAIL_COMMANDS_ON_ERRORS" == "true" ]; then
|
||||
echo "Running in fail-on-errors mode"
|
||||
set -e
|
||||
fi
|
||||
|
||||
pnpm install --frozen-lockfile \
|
||||
--filter @zitadel/login \
|
||||
--filter @zitadel/client \
|
||||
--filter @zitadel/proto \
|
||||
--filter zitadel-monorepo
|
||||
pnpm cypress install
|
||||
pnpm test:integration:login
|
||||
|
||||
if [ "$FAIL_COMMANDS_ON_ERRORS" != "true" ]; then
|
||||
exit 0
|
||||
fi
|
30
.devcontainer/base/commands/turbo-lint-unit.post-attach.sh
Executable file
30
.devcontainer/base/commands/turbo-lint-unit.post-attach.sh
Executable file
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$FAIL_COMMANDS_ON_ERRORS" == "true" ]; then
|
||||
set -e
|
||||
fi
|
||||
|
||||
echo
|
||||
echo
|
||||
echo
|
||||
echo -e "THANKS FOR CONTRIBUTING TO ZITADEL 🚀"
|
||||
echo
|
||||
echo "Your dev container is configured for fixing linting and unit tests."
|
||||
echo "No other services are running alongside this container."
|
||||
echo
|
||||
echo "To fix all auto-fixable linting errors, run:"
|
||||
echo "pnpm turbo lint:fix"
|
||||
echo
|
||||
echo "To watch console linting errors, run:"
|
||||
echo "pnpm turbo watch lint --filter console"
|
||||
echo
|
||||
echo "To watch @zitadel/client unit test failures, run:"
|
||||
echo "pnpm turbo watch test:unit --filter @zitadel/client"
|
||||
echo
|
||||
echo "To watch @zitadel/login relevant unit tests and linting failures, run:"
|
||||
echo "pnpm turbo watch lint test:unit --filter @zitadel/login..."
|
||||
echo
|
||||
|
||||
if [ "$FAIL_COMMANDS_ON_ERRORS" != "true" ]; then
|
||||
exit 0
|
||||
fi
|
12
.devcontainer/base/commands/turbo-lint-unit.update-content.sh
Executable file
12
.devcontainer/base/commands/turbo-lint-unit.update-content.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$FAIL_COMMANDS_ON_ERRORS" == "true" ]; then
|
||||
set -e
|
||||
fi
|
||||
|
||||
pnpm install --frozen-lockfile --recursive
|
||||
pnpm turbo lint test:unit
|
||||
|
||||
if [ "$FAIL_COMMANDS_ON_ERRORS" != "true" ]; then
|
||||
exit 0
|
||||
fi
|
Reference in New Issue
Block a user