diff --git a/scripts/check.sh b/scripts/check.sh index 750831ed..f807d2c8 100755 --- a/scripts/check.sh +++ b/scripts/check.sh @@ -9,8 +9,6 @@ cargo fmt --all -- --check cargo machete cargo test --verbose -scripts/update-api-types.sh - echo "Running checks in frontend" cd ../frontend npm ci diff --git a/scripts/e2e.sh b/scripts/e2e.sh index 55cb1ac8..821bd0bc 100755 --- a/scripts/e2e.sh +++ b/scripts/e2e.sh @@ -3,6 +3,12 @@ set -e set -o pipefail +node_version=$(node -v | sed 's/^v\([0-9]*\).*/\1/') +if [ "$node_version" != "22" ]; then + echo "Error: This script requires Node.js version 22, found: $node_version" + exit 1 +fi + # Check if the argument is provided if [ $# -eq 0 ]; then echo "Usage: $0 " @@ -20,6 +26,13 @@ npm run build ../scripts/utils/wait-for-server.sh +../scripts/update-api-types.sh +if [[ $(git status --porcelain) ]]; then + git status --porcelain + echo "Failing CI because the working directory is not clean after generating api types" + exit 1 +fi + pids=() for i in $(seq 1 $process_count); do node test-client/dist/cli.js > "../logs/log_${i}.log" 2>&1 &