Skip to content

Commit 56e5298

Browse files
author
Chris Coutinho
committed
Wait for apps to be installed
1 parent 2bcfd3d commit 56e5298

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/test.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,55 @@ jobs:
4949
done
5050
echo "Service is ready (returned 401)."
5151
52+
- name: Verify required apps are installed and ready
53+
run: |
54+
echo "Checking if required Nextcloud apps are installed and ready..."
55+
56+
# Check Notes app
57+
echo "Checking Notes app..."
58+
max_attempts=30
59+
attempt=0
60+
until curl -u admin:admin -s -w "%{http_code}\n" -o /dev/null http://localhost:8080/apps/notes/api/v1/settings | grep -q "200"; do
61+
attempt=$((attempt + 1))
62+
if [ $attempt -ge $max_attempts ]; then
63+
echo "Notes app not ready after $max_attempts attempts."
64+
exit 1
65+
fi
66+
echo "Notes app attempt $attempt/$max_attempts: Not ready, sleeping for 3 seconds..."
67+
sleep 3
68+
done
69+
echo "Notes app is ready."
70+
71+
# Check Tables app
72+
echo "Checking Tables app..."
73+
attempt=0
74+
until curl -u admin:admin -s -w "%{http_code}\n" -o /dev/null http://localhost:8080/ocs/v2.php/apps/tables/api/2/tables | grep -q "200"; do
75+
attempt=$((attempt + 1))
76+
if [ $attempt -ge $max_attempts ]; then
77+
echo "Tables app not ready after $max_attempts attempts."
78+
exit 1
79+
fi
80+
echo "Tables app attempt $attempt/$max_attempts: Not ready, sleeping for 3 seconds..."
81+
sleep 3
82+
done
83+
echo "Tables app is ready."
84+
85+
# Check Calendar app (CalDAV endpoint)
86+
echo "Checking Calendar app..."
87+
attempt=0
88+
until curl -u admin:admin -s -w "%{http_code}\n" -o /dev/null -X PROPFIND http://localhost:8080/remote.php/dav/calendars/admin | grep -E "20[0-9]"; do
89+
attempt=$((attempt + 1))
90+
if [ $attempt -ge $max_attempts ]; then
91+
echo "Calendar app not ready after $max_attempts attempts."
92+
exit 1
93+
fi
94+
echo "Calendar app attempt $attempt/$max_attempts: Not ready, sleeping for 3 seconds..."
95+
sleep 3
96+
done
97+
echo "Calendar app is ready."
98+
99+
echo "All required apps are installed and ready!"
100+
52101
# Add subsequent steps here, e.g., running tests
53102
- name: Run tests
54103
env:

0 commit comments

Comments
 (0)