Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! fixup! fixup! ci: Add ci job to run wopi-…
Browse files Browse the repository at this point in the history
…validator-core
  • Loading branch information
juliusknorr committed Nov 29, 2024
1 parent b6bb80d commit c6af146
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/wopi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ jobs:
run: |
mkdir data
echo '<?php $CONFIG=["memcache.local"=>"\OC\Memcache\APCu","hashing_default_password"=>true];' > config/config.php
./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password
./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin
./occ app:enable --force ${{ env.APP_NAME }}
- name: Run WOPI validator tests
working-directory: apps/${{ env.APP_NAME }}
run: |
PHP_CLI_SERVER_WORKERS=10 php -S localhost:8080 -t ../../ &
NEXTCLOUD_URL=http://localhost:8080 ./tests/wopi-test.sh
PHP_CLI_SERVER_WORKERS=10 php -S 172.17.0.1:8080 -t ../../ &
NEXTCLOUD_URL=http://172.17.0.1 ./tests/wopi-test.sh
6 changes: 4 additions & 2 deletions tests/wopi-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
set -e
set -x


# current timestamp as filename
FILENAME=$(date +%s)

NEXTCLOUD_URL=${NEXTCLOUD_URL:-http://localhost}
NEXTCLOUD_URL=${NEXTCLOUD_URL:-http://nextcloud.local}
USERNAME=${USERNAME:-admin}
PASSWORD=${PASSWORD:-admin}
HOST_IP=${HOST_IP:-172.17.0.1}

curl $NEXTCLOUD_URL/status.php --max-time 5 --retry 5 --retry-delay 0 --retry-max-time 30 --retry-connrefused

Expand All @@ -35,4 +37,4 @@ WOPI_URL="$NEXTCLOUD_URL/index.php/apps/richdocuments/wopi/files/$FILE_ID"
echo "WOPI URL: $WOPI_URL"
echo "WOPI token generated: $WOPI_TOKEN"

docker run --network nextcloud_default --add-host nextcloud.local:192.168.21.1 --rm tylerbutler/wopi-validator -- -w $WOPI_URL -t $WOPI_TOKEN -l 0 "$@"
docker run --add-host nextcloud.local:${HOST_IP} --rm tylerbutler/wopi-validator -- -w $WOPI_URL -t $WOPI_TOKEN -l 0 "$@"

0 comments on commit c6af146

Please sign in to comment.