Files
nest/scripts/run-integration.sh
snowykte0426 75958d7ab1 fix(scripts): stop hiding build failures in the setup scripts
`prepare.sh` and `run-integration.sh` sent the build output to /dev/null and had no
shebang, no `set -e` and no exit status check. A failed build was invisible, the script
carried on into the Docker steps and still exited 0.

The `&>` redirect was also not portable. Under dash, which is /bin/sh on most Debian and
Ubuntu systems, it parses as "run in the background" plus a separate no-op redirect, so
the build raced the steps that followed instead of being muted.

Adds `#!/usr/bin/env bash` and `set -eu` to both scripts and drops the redirect.
`pipefail` is left out on purpose so the scripts still work when invoked with `sh` on a
dash system; neither script uses a pipeline and neither reads a shell variable.

Also corrects CONTRIBUTING.md. `npm run build` runs `move:node_modules`, which copies the
compiled output into the root `node_modules/@nestjs`; `move:samples` is a separate task
that only `build:samples` invokes. Two places claimed the build moves packages into the
`sample` directories. `prepare.sh` also starts Docker containers and waits for RabbitMQ,
which its description did not mention, and `npm run test` needs neither a build nor
Docker, so it now comes before the integration setup.
2026-08-30 20:13:06 +02:00

15 lines
327 B
Bash
Executable File

#!/usr/bin/env bash
set -eu
# 1. Build fresh packages and move them to the integration directory
npm run build
# 2. Start docker containers to perform integration tests
npm run test:docker:up
# 3. Wait for RabbitMQ to accept AMQP connections
npm run test:docker:wait:rmq
# 4. Run integration tests
npm run test:integration