diff --git a/.github/workflows/tests-deploy.yml b/.github/workflows/tests-deploy.yml index 31eb4446..72c5f8e3 100644 --- a/.github/workflows/tests-deploy.yml +++ b/.github/workflows/tests-deploy.yml @@ -98,23 +98,26 @@ jobs: --info-xml https://raw.githubusercontent.com/cloud-py-api/nc_py_api/main/examples/as_app/skeleton/appinfo/info.xml ./occ app_api:app:enable skeleton ./occ app_api:app:disable skeleton - ./occ app_api:app:unregister skeleton - ./occ app_api:daemon:unregister docker_local_sock - name: Check logs run: | grep -q 'Hello from skeleton :)' data/nextcloud.log || error grep -q 'Bye bye from skeleton :(' data/nextcloud.log || error - - name: Test OCC commands(docker) - run: python3 apps/${{ env.APP_NAME }}/tests/test_occ_commands_docker.py - - name: Save container ingo & logs if: always() run: | docker inspect nc_app_skeleton | json_pp > container.json docker logs nc_app_skeleton > container.log 2>&1 + - name: Unregister Skeleton & Daemon + run: | + ./occ app_api:app:unregister skeleton + ./occ app_api:daemon:unregister docker_local_sock + + - name: Test OCC commands(docker) + run: python3 apps/${{ env.APP_NAME }}/tests/test_occ_commands_docker.py + - name: Upload Container info if: always() uses: actions/upload-artifact@v3 @@ -171,8 +174,6 @@ jobs: --info-xml https://raw.githubusercontent.com/cloud-py-api/nc_py_api/main/examples/as_app/skeleton/appinfo/info.xml docker exec nextcloud sudo -u www-data php occ app_api:app:enable skeleton docker exec nextcloud sudo -u www-data php occ app_api:app:disable skeleton - docker exec nextcloud sudo -u www-data php occ app_api:app:unregister skeleton --silent - docker exec nextcloud sudo -u www-data php occ app_api:daemon:unregister docker_local_sock - name: Copy NC log to host run: docker cp nextcloud:/var/www/html/data/nextcloud.log nextcloud.log @@ -188,6 +189,11 @@ jobs: docker inspect nc_app_skeleton | json_pp > container.json docker logs nc_app_skeleton > container.log 2>&1 + - name: Unregister Skeleton & Daemon + run: | + docker exec nextcloud sudo -u www-data php occ app_api:app:unregister skeleton + docker exec nextcloud sudo -u www-data php occ app_api:daemon:unregister docker_local_sock + - name: Upload Container info if: always() uses: actions/upload-artifact@v3 @@ -249,8 +255,6 @@ jobs: --info-xml https://raw.githubusercontent.com/cloud-py-api/nc_py_api/main/examples/as_app/skeleton/appinfo/info.xml docker exec nextcloud sudo -u www-data php occ app_api:app:enable skeleton docker exec nextcloud sudo -u www-data php occ app_api:app:disable skeleton - docker exec nextcloud sudo -u www-data php occ app_api:app:unregister skeleton --silent - docker exec nextcloud sudo -u www-data php occ app_api:daemon:unregister docker_by_port - name: Copy NC log to host run: docker cp nextcloud:/var/www/html/data/nextcloud.log nextcloud.log @@ -266,6 +270,11 @@ jobs: docker inspect nc_app_skeleton | json_pp > container.json docker logs nc_app_skeleton > container.log 2>&1 + - name: Unregister Skeleton & Daemon + run: | + docker exec nextcloud sudo -u www-data php occ app_api:app:unregister skeleton + docker exec nextcloud sudo -u www-data php occ app_api:daemon:unregister docker_by_port + - name: Upload Container info if: always() uses: actions/upload-artifact@v3 @@ -326,8 +335,6 @@ jobs: --info-xml https://raw.githubusercontent.com/cloud-py-api/nc_py_api/main/examples/as_app/skeleton/appinfo/info.xml docker exec nextcloud sudo -u www-data php occ app_api:app:enable skeleton docker exec nextcloud sudo -u www-data php occ app_api:app:disable skeleton - docker exec nextcloud sudo -u www-data php occ app_api:app:unregister skeleton --silent - docker exec nextcloud sudo -u www-data php occ app_api:daemon:unregister docker_by_port - name: Copy NC log to host run: docker cp nextcloud:/var/www/html/data/nextcloud.log nextcloud.log @@ -343,6 +350,11 @@ jobs: docker inspect nc_app_skeleton | json_pp > container.json docker logs nc_app_skeleton > container.log 2>&1 + - name: Unregister Skeleton & Daemon + run: | + docker exec nextcloud sudo -u www-data php occ app_api:app:unregister skeleton + docker exec nextcloud sudo -u www-data php occ app_api:daemon:unregister docker_by_port + - name: Upload Container info if: always() uses: actions/upload-artifact@v3 @@ -468,23 +480,26 @@ jobs: --info-xml https://raw.githubusercontent.com/cloud-py-api/nc_py_api/main/examples/as_app/skeleton/appinfo/info.xml ./occ app_api:app:enable skeleton ./occ app_api:app:disable skeleton - ./occ app_api:app:unregister skeleton --silent - ./occ app_api:daemon:unregister docker_local_sock - name: Check logs run: | grep -q 'Hello from skeleton :)' data/nextcloud.log || error grep -q 'Bye bye from skeleton :(' data/nextcloud.log || error - - name: Test OCC commands(docker) - run: python3 apps/${{ env.APP_NAME }}/tests/test_occ_commands_docker.py - - name: Save container ingo & logs if: always() run: | docker inspect nc_app_skeleton | json_pp > container.json docker logs nc_app_skeleton > container.log 2>&1 + - name: Unregister Skeleton & Daemon + run: | + ./occ app_api:app:unregister skeleton + ./occ app_api:daemon:unregister docker_local_sock + + - name: Test OCC commands(docker) + run: python3 apps/${{ env.APP_NAME }}/tests/test_occ_commands_docker.py + - name: Check redis keys run: | docker exec redis redis-cli keys '*app_api*' || error