Skip to content

Commit

Permalink
chore(ci): add mounts test
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Borysenko <[email protected]>
  • Loading branch information
andrey18106 committed Jan 17, 2025
1 parent 331eb25 commit 186eba5
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/tests-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -797,9 +797,12 @@ jobs:
PHP_CLI_SERVER_WORKERS=2 php -S 127.0.0.1:8080 &
./occ app_api:daemon:register docker_local_sock Docker docker-install http /var/run/docker.sock http://127.0.0.1:8080/index.php
./occ app_api:daemon:list
mkdir ./test_mount
$TEST_MOUNT_ABS_PATH=$(realpath ./test_mount)
./occ app_api:app:register app-skeleton-python docker_local_sock \
--info-xml https://raw.githubusercontent.com/nextcloud/app-skeleton-python/main/appinfo/info.xml \
--env='TEST_ENV_2=2'
--env='TEST_ENV_2=2' \
--mount "$TEST_MOUNT_ABS_PATH:/test_mount"
./occ app_api:app:enable app-skeleton-python
./occ app_api:app:disable app-skeleton-python
Expand All @@ -810,15 +813,19 @@ jobs:
- name: Check docker inspect TEST_ENV_1
run: |
docker inspect --format '{{ json .Config.Env}}' nc_app_app-skeleton-python | grep -q 'TEST_ENV_1=0' || error
docker inspect --format '{{ json .Config.Env }}' nc_app_app-skeleton-python | grep -q 'TEST_ENV_1=0' || error
- name: Check docker inspect TEST_ENV_2
run: |
docker inspect --format '{{ json .Config.Env}}' nc_app_app-skeleton-python | grep -q 'TEST_ENV_2=2' || error
docker inspect --format '{{ json .Config.Env }}' nc_app_app-skeleton-python | grep -q 'TEST_ENV_2=2' || error
- name: Check docker inspect TEST_ENV_3
run: |
docker inspect --format '{{ json .Config.Env}}' nc_app_app-skeleton-python | grep -q 'TEST_ENV_3=' && error || true
docker inspect --format '{{ json .Config.Env }}' nc_app_app-skeleton-python | grep -q 'TEST_ENV_3=' && error || true
- name: Check docker inspect TEST_MOUNT
run: |
docker inspect --format '{{ json .Mounts }}' nc_app_app-skeleton-python | grep -q 'Source":"'"$TEST_MOUNT_ABS_PATH"'"' || error
- name: Save container info & logs
if: always()
Expand Down

0 comments on commit 186eba5

Please sign in to comment.