Update e2e tests

This commit is contained in:
Andras Schmelczer 2025-08-25 19:25:03 +01:00
parent 81b81e30ff
commit 43311ed30b
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
3 changed files with 31 additions and 13 deletions

View file

@ -36,16 +36,4 @@ jobs:
cargo run config-e2e.yml --color never & cargo run config-e2e.yml --color never &
cd .. cd ..
scripts/update-api-types.sh
cd frontend
npm ci
npm run build
npm run lint
if [[ $(git status --porcelain) ]]; then
git status --porcelain
echo "Failing CI because the working directory is not clean after updating the API types"
exit 1
fi
cd ..
scripts/e2e.sh 32 scripts/e2e.sh 32

29
scripts/check.sh Executable file
View file

@ -0,0 +1,29 @@
#!/usr/bin/env bash
set -e
echo "Running checks in sync-server"
cd sync-server
cargo clippy --all-targets --all-features
cargo fmt --all -- --check
cargo machete
cargo test --verbose
scripts/update-api-types.sh
echo "Running checks in frontend"
cd ../frontend
npm ci
npm run build
npm run lint
npm run test
if [[ $(git status --porcelain) ]]; then
git status --porcelain
echo "Failing CI because the working directory is not clean after linting"
exit 1
fi
echo "Success"
cd ..

View file

@ -15,6 +15,7 @@ process_count=$1
mkdir -p logs mkdir -p logs
cd frontend cd frontend
npm ci
npm run build npm run build
../scripts/utils/wait-for-server.sh ../scripts/utils/wait-for-server.sh
@ -33,7 +34,7 @@ print_failed_log() {
# Get the exit code of the process # Get the exit code of the process
wait ${pids[$i-1]} wait ${pids[$i-1]}
exit_code=$? exit_code=$?
# Only consider non-zero exit codes as failures # Only consider non-zero exit codes as failures
if [ $exit_code -ne 0 ]; then if [ $exit_code -ne 0 ]; then
cat "$(pwd)/logs/log_${i}.log" cat "$(pwd)/logs/log_${i}.log"