|
49 | 49 | done |
50 | 50 | echo "Service is ready (returned 401)." |
51 | 51 |
|
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 -H 'OCS-APIRequest: true' -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 | | - # Debug output |
93 | | - echo "Final calendar check response:" |
94 | | - curl -u admin:admin -v -X PROPFIND http://localhost:8080/remote.php/dav/calendars/admin |
95 | | - exit 1 |
96 | | - fi |
97 | | - echo "Calendar app attempt $attempt/$max_attempts: Not ready, sleeping for 5 seconds..." |
98 | | - sleep 5 |
99 | | - done |
100 | | - echo "Calendar app is ready." |
101 | | - |
102 | | - # Additional verification - wait longer for CalDAV to be fully ready |
103 | | - echo "Waiting additional 10 seconds for CalDAV service to stabilize..." |
104 | | - sleep 10 |
105 | | -
|
106 | | - echo "All required apps are installed and ready!" |
107 | | -
|
108 | 52 | # Add subsequent steps here, e.g., running tests |
109 | 53 | - name: Run tests |
110 | 54 | env: |
|
0 commit comments