ci: Simplify wait step for OpenVidu Meet using wait-on
ci: use nohup to run OpenVidu Meet in the background ci: Comment out wait-on installation steps in integration tests
This commit is contained in:
parent
7135270b8a
commit
d1205b82fd
42
.github/workflows/integration-test.yaml
vendored
42
.github/workflows/integration-test.yaml
vendored
@ -43,31 +43,21 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: '20'
|
node-version: '20'
|
||||||
- name: Setup yarn # Needed for the redlock package
|
- name: Setup yarn # Needed for the redlock package
|
||||||
run: npm install -g yarn
|
# run: npm install -g yarn
|
||||||
|
# - name: Install wait-on
|
||||||
|
run: npm install -g wait-on
|
||||||
- name: Install LK CLI
|
- name: Install LK CLI
|
||||||
run: |
|
run: |
|
||||||
curl -sSL https://get.livekit.io/cli | bash
|
curl -sSL https://get.livekit.io/cli | bash
|
||||||
- name: Setup OpenVidu Meet
|
- name: Setup OpenVidu Meet
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
./prepare.sh
|
./prepare.sh
|
||||||
cd backend
|
cd backend
|
||||||
npm install
|
npm install
|
||||||
npm run start:prod &
|
npm run start:prod &
|
||||||
- name: Wait for OpenVidu Meet to Start
|
# - name: Wait for OpenVidu Meet to Start
|
||||||
shell: bash
|
# run: wait-on --timeout 30000 http://localhost:6080
|
||||||
run: |
|
|
||||||
MAX_WAIT_SECONDS=30
|
|
||||||
SECONDS=0
|
|
||||||
until curl -s -f -o /dev/null http://localhost:6080; do
|
|
||||||
if [ $SECONDS -gt $MAX_WAIT_SECONDS ]; then
|
|
||||||
echo "OpenVidu Meet did not start in $MAX_WAIT_SECONDS seconds"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo "Waiting for OpenVidu Meet to be ready ..."
|
|
||||||
sleep 5
|
|
||||||
SECONDS=$((SECONDS+5))
|
|
||||||
done
|
|
||||||
echo "OpenVidu Meet started in $SECONDS seconds"
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
cd backend
|
cd backend
|
||||||
@ -123,6 +113,8 @@ jobs:
|
|||||||
node-version: '20'
|
node-version: '20'
|
||||||
- name: Setup yarn # Needed for the redlock package
|
- name: Setup yarn # Needed for the redlock package
|
||||||
run: npm install -g yarn
|
run: npm install -g yarn
|
||||||
|
# - name: Install wait-on
|
||||||
|
# run: npm install -g wait-on
|
||||||
- name: Install LK CLI
|
- name: Install LK CLI
|
||||||
run: |
|
run: |
|
||||||
curl -sSL https://get.livekit.io/cli | bash
|
curl -sSL https://get.livekit.io/cli | bash
|
||||||
@ -132,21 +124,9 @@ jobs:
|
|||||||
cd backend
|
cd backend
|
||||||
npm install
|
npm install
|
||||||
npm run start:prod &
|
npm run start:prod &
|
||||||
- name: Wait for OpenVidu Meet to Start
|
# - name: Wait for OpenVidu Meet to Start
|
||||||
shell: bash
|
# shell: bash
|
||||||
run: |
|
# run: wait-on --timeout 30000 http://localhost:6080
|
||||||
MAX_WAIT_SECONDS=30
|
|
||||||
SECONDS=0
|
|
||||||
until curl -s -f -o /dev/null http://localhost:6080; do
|
|
||||||
if [ $SECONDS -gt $MAX_WAIT_SECONDS ]; then
|
|
||||||
echo "OpenVidu Meet did not start in $MAX_WAIT_SECONDS seconds"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo "Waiting for OpenVidu Meet to be ready ..."
|
|
||||||
sleep 5
|
|
||||||
SECONDS=$((SECONDS+5))
|
|
||||||
done
|
|
||||||
echo "OpenVidu Meet started in $SECONDS seconds"
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
cd backend
|
cd backend
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user