Skip to content

Commit

Permalink
fixed actions with new "unregister" implementation(1)
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Piskun <[email protected]>
  • Loading branch information
bigcat88 committed Nov 26, 2023
1 parent 63acc05 commit b964128
Showing 1 changed file with 31 additions and 16 deletions.
47 changes: 31 additions & 16 deletions .github/workflows/tests-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b964128

Please sign in to comment.