mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 17:19:15 +08:00
fix(ci): Run UI tests only for 15mins max in case of build failure (#1718)
This commit is contained in:
11
.github/scripts/run_ui_tests.sh
vendored
11
.github/scripts/run_ui_tests.sh
vendored
@ -1,15 +1,17 @@
|
||||
#! /usr/bin/env bash
|
||||
#!/bin/bash
|
||||
sudo apt update
|
||||
apt install net-tools
|
||||
mkdir tests
|
||||
|
||||
COUNT=0
|
||||
#download connector ui tests
|
||||
while [ ! -f $HOME/target/test/connector_tests.json ]
|
||||
do
|
||||
if [ $SECONDS > 20 ]
|
||||
if [ $COUNT -gt 10 ];
|
||||
then
|
||||
exit 1
|
||||
fi
|
||||
COUNT=$((COUNT+1))
|
||||
sleep 2
|
||||
wget $UI_TESTCASES_PATH && mv testcases $HOME/target/test/connector_tests.json
|
||||
done
|
||||
@ -20,12 +22,15 @@ $GECKOWEBDRIVER/geckodriver > tests/geckodriver.log 2>&1 &
|
||||
#start server and run ui tests
|
||||
cargo run &
|
||||
|
||||
COUNT=0
|
||||
#Wait for the server to start in port 8080
|
||||
while netstat -lnt | awk '$4 ~ /:8080$/ {exit 1}'; do
|
||||
if [ $SECONDS > 900 ]
|
||||
#Wait for 15mins to start otherwise kill the task
|
||||
if [ $COUNT -gt 90 ];
|
||||
then
|
||||
exit 1
|
||||
else
|
||||
COUNT=$((COUNT+1))
|
||||
sleep 10
|
||||
fi
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user