9999 --admin-user admin --admin-pass ${{ env.NC_AUTH_PASS }}
100100 php occ config:system:set loglevel --value=1 --type=integer
101101 php occ config:system:set debug --value=true --type=boolean
102- php -S localhost:8080 &
102+ PHP_CLI_SERVER_WORKERS=2 php -S localhost:8080 &
103103
104104 - name : Checkout NcPyApi
105105 uses : actions/checkout@v4
@@ -143,7 +143,7 @@ jobs:
143143 - name : Enable Talk
144144 run : php occ app:enable spreed
145145
146- - name : Generate coverage report
146+ - name : Generate coverage report (1)
147147 working-directory : nc_py_api
148148 run : |
149149 coverage run --data-file=.coverage.talk_bot tests/_talk_bot.py &
@@ -152,6 +152,23 @@ jobs:
152152 kill -15 $(cat /tmp/_talk_bot.pid)
153153 timeout 3m tail --pid=$(cat /tmp/_talk_bot.pid) -f /dev/null
154154 coverage run --data-file=.coverage.at_the_end -m pytest tests/_tests_at_the_end.py
155+
156+ - name : Uninstall NcPyApi
157+ run : |
158+ php occ app_api:app:unregister "$APP_ID" --silent
159+ php occ app_api:daemon:unregister manual_install
160+
161+ - name : Generate coverage report (2)
162+ working-directory : nc_py_api
163+ run : |
164+ coverage run --data-file=.coverage.ci_install_models tests/_install_init_handler_models.py &
165+ echo $! > /tmp/_install_models.pid
166+ python3 tests/_install_wait.py http://127.0.0.1:$APP_PORT/heartbeat "\"status\":\"ok\"" 15 0.5
167+ cd ..
168+ sh nc_py_api/scripts/ci_register.sh "$APP_ID" "$APP_VERSION" "$APP_SECRET" "localhost" "$APP_PORT"
169+ kill -15 $(cat /tmp/_install_models.pid)
170+ timeout 3m tail --pid=$(cat /tmp/_install_models.pid) -f /dev/null
171+ cd nc_py_api
155172 coverage combine && coverage xml && coverage html
156173
157174 - name : HTML coverage to artifacts
@@ -243,7 +260,7 @@ jobs:
243260 --admin-user admin --admin-pass ${{ env.NC_AUTH_PASS }}
244261 php occ config:system:set loglevel --value=1
245262 php occ config:system:set debug --value=true --type=boolean
246- php -S localhost:8080 &
263+ PHP_CLI_SERVER_WORKERS=2 php -S localhost:8080 &
247264
248265 - name : Checkout NcPyApi
249266 uses : actions/checkout@v4
@@ -287,7 +304,7 @@ jobs:
287304 - name : Enable Talk
288305 run : php occ app:enable spreed
289306
290- - name : Generate coverage report
307+ - name : Generate coverage report (1)
291308 working-directory : nc_py_api
292309 run : |
293310 coverage run --data-file=.coverage.talk_bot tests/_talk_bot.py &
@@ -296,6 +313,23 @@ jobs:
296313 kill -15 $(cat /tmp/_talk_bot.pid)
297314 timeout 3m tail --pid=$(cat /tmp/_talk_bot.pid) -f /dev/null
298315 coverage run --data-file=.coverage.at_the_end -m pytest tests/_tests_at_the_end.py
316+
317+ - name : Uninstall NcPyApi
318+ run : |
319+ php occ app_api:app:unregister "$APP_ID" --silent
320+ php occ app_api:daemon:unregister manual_install
321+
322+ - name : Generate coverage report (2)
323+ working-directory : nc_py_api
324+ run : |
325+ coverage run --data-file=.coverage.ci_install_models tests/_install_init_handler_models.py &
326+ echo $! > /tmp/_install_models.pid
327+ python3 tests/_install_wait.py http://127.0.0.1:$APP_PORT/heartbeat "\"status\":\"ok\"" 15 0.5
328+ cd ..
329+ sh nc_py_api/scripts/ci_register.sh "$APP_ID" "$APP_VERSION" "$APP_SECRET" "localhost" "$APP_PORT"
330+ kill -15 $(cat /tmp/_install_models.pid)
331+ timeout 3m tail --pid=$(cat /tmp/_install_models.pid) -f /dev/null
332+ cd nc_py_api
299333 coverage combine && coverage xml && coverage html
300334
301335 - name : HTML coverage to artifacts
@@ -381,7 +415,7 @@ jobs:
381415 --admin-user admin --admin-pass ${{ env.NC_AUTH_PASS }}
382416 php occ config:system:set loglevel --value=1 --type=integer
383417 php occ config:system:set debug --value=true --type=boolean
384- php -S localhost:8080 &
418+ PHP_CLI_SERVER_WORKERS=2 php -S localhost:8080 &
385419
386420 - name : Checkout NcPyApi
387421 uses : actions/checkout@v4
@@ -512,7 +546,7 @@ jobs:
512546 ./occ config:system:set debug --value=true --type=boolean
513547 ./occ app:enable notifications
514548 ./occ app:enable notes
515- php -S localhost:8080 &
549+ PHP_CLI_SERVER_WORKERS=2 php -S localhost:8080 &
516550
517551 - name : Checkout NcPyApi
518552 uses : actions/checkout@v4
@@ -662,7 +696,7 @@ jobs:
662696 ./occ config:system:set debug --value=true --type=boolean
663697 ./occ app:enable notifications
664698 ./occ app:enable activity
665- php -S localhost:8080 &
699+ PHP_CLI_SERVER_WORKERS=2 php -S localhost:8080 &
666700
667701 - name : Checkout NcPyApi
668702 uses : actions/checkout@v4
@@ -802,7 +836,7 @@ jobs:
802836 ./occ config:system:set debug --value=true --type=boolean
803837 ./occ app:enable activity
804838 ./occ app:enable notes
805- php -S localhost:8080 &
839+ PHP_CLI_SERVER_WORKERS=2 php -S localhost:8080 &
806840
807841 - name : Checkout NcPyApi
808842 uses : actions/checkout@v4
@@ -847,7 +881,7 @@ jobs:
847881 uses : codecov/codecov-action@v3
848882 with :
849883 token : ${{ secrets.CODECOV_TOKEN }}
850- name : coverage_sqlite_${{ matrix.nextcloud }}
884+ name : coverage_sqlite_${{ matrix.nextcloud }}_client
851885 file : coverage.xml
852886 fail_ci_if_error : true
853887 verbose : true
0 commit comments