4747 echo "lxd_extra_profile=network" | tee -a "$GITHUB_OUTPUT"
4848 else
4949 LXC_CMD="incus"
50- RUNNER_LABEL="ubuntu-20.04 "
50+ RUNNER_LABEL="ubuntu-latest "
5151 fi
5252
5353 echo "runner_label=$RUNNER_LABEL" | tee -a $GITHUB_OUTPUT
7373 - name : Setup incus
7474 if : ${{ needs.determine-runner.outputs.runner_label != 'ubuntu-20.04-arm64' }}
7575 run : |
76- curl https://pkgs.zabbly.com/get/incus-stable | sudo sh -x
76+ sudo apt-get install -y incus qemu-system incus-tools
7777 sudo iptables -I DOCKER-USER -i incusbr0 -j ACCEPT
7878 sudo iptables -I DOCKER-USER -o incusbr0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
7979 sudo incus admin init --auto
@@ -341,21 +341,22 @@ jobs:
341341# }
342342
343343 test-dist-upgrade :
344+ if : false
344345 needs :
345346 - determine-runner
346347 runs-on : ${{ needs.determine-runner.outputs.runner_label }}
347348 env :
348349 VERSION : " ${{ inputs.git_ref || github.ref }}"
349350 LXC : " ${{ needs.determine-runner.outputs.lxc_cmd }}"
350351 LXD_EXTRA_PROFILE : " ${{ needs.determine-runner.outputs.lxd_extra_profile }}"
351- PREVIOUS_IMAGE_URL_ARM64 : " https://github.com/nextcloud/nextcloudpi/releases/download/v1.53.0 /NextcloudPi_LXD_arm64_v1.53.0 .tar.gz"
352- PREVIOUS_IMAGE_URL_AMD64 : " https://github.com/nextcloud/nextcloudpi/releases/download/v1.53.0 /NextCloudPi_LXD_x86_v1.53.0 .tar.gz"
352+ PREVIOUS_IMAGE_URL_ARM64 : " https://github.com/nextcloud/nextcloudpi/releases/download/v1.53.2 /NextcloudPi_LXD_arm64_v1.53.2 .tar.gz"
353+ PREVIOUS_IMAGE_URL_AMD64 : " https://github.com/nextcloud/nextcloudpi/releases/download/v1.53.2 /NextCloudPi_LXD_x86_v1.53.2 .tar.gz"
353354 USE_INCUS : " ${{ needs.determine-runner.outputs.lxc_cmd == 'incus' && 'yes' || 'no' }}"
354355 steps :
355356 - name : Setup incus
356357 if : ${{ needs.determine-runner.outputs.runner_label != 'ubuntu-20.04-arm64' }}
357358 run : |
358- curl https://pkgs.zabbly.com/get/incus-stable | sudo sh -x
359+ sudo apt-get install -y incus qemu-system incus-tools
359360 sudo iptables -I DOCKER-USER -i incusbr0 -j ACCEPT
360361 sudo iptables -I DOCKER-USER -o incusbr0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
361362 sudo incus admin init --auto
@@ -364,31 +365,40 @@ jobs:
364365 with :
365366 ref : " v1.54.3"
366367 - name : Setup Firefox
368+ if : ${{ runner.arch != 'ARM64' }}
367369 continue-on-error : true
368370 id : setup-firefox-browser-action
369371 uses : browser-actions/setup-firefox@latest
370372 - name : Setup Firefox from packages
371- if : ${{ steps.setup-firefox-browser-action.outcome == 'failure' }}
373+ if : ${{ runner.arch == 'ARM64' || steps.setup-firefox-browser-action.outcome == 'failure' }}
372374 run : |
375+ sudo apt-get update
373376 sudo apt-get install -y --no-install-recommends firefox
374377 - name : Setup GeckoDriver
375378 env :
376379 GH_TOKEN : ${{ github.token }}
377380 run : |
381+ set -x
378382 arch=linux64
379- if [[ "$RUNNER_ARCH " == "ARM64" ]]
383+ if [[ "${{ runner.arch }} " == "ARM64" ]]
380384 then
381385 arch="linux-aarch64"
382386 fi
383387 gh release download -R mozilla/geckodriver -p 'geckodriver-*-'"$arch.tar.gz"
384388 tar xf "geckodriver-"*"-$arch.tar.gz"
385389 sudo mv geckodriver /usr/local/bin/
390+ sudo chmod +x /usr/local/bin/geckodriver
391+ echo "GECKODRIVER_PATH=/usr/local/bin/geckodriver" >> "$GITHUB_ENV"
392+ geckodriver -V
386393 - name : Setup Selenium
387- run : pip install selenium
394+ run : |
395+ sudo apt-get -y install python3-venv
396+ python3 -m venv ./.venv
397+ ./.venv/bin/pip install 'selenium>=3.0.0,<4.0.0'
388398 - name : download LXD image
389399 run : |
390400 image_url="${PREVIOUS_IMAGE_URL_AMD64?}"
391- if [[ "$RUNNER_ARCH " == "ARM64" ]]
401+ if [[ "${{ runner.arch }} " == "ARM64" ]]
392402 then
393403 image_url="${PREVIOUS_IMAGE_URL_ARM64?}"
394404 fi
@@ -412,8 +422,11 @@ jobs:
412422 - name : Activate and Test LXD Image
413423 working-directory : ./tests
414424 run : |
425+ set -x
426+ export GECKODRIVER_PATH="$GECKODRIVER_PATH"
427+ export FF_BINARY_PATH="$(which firefox)"
415428 sudo "$LXC" exec ncp -- bash -c 'tail -f /var/log/ncp.log' |& awk '{ print "NCP::" $0 }' &
416- python activation_tests.py --no-gui "nextcloudpi.local" 443 4443 || {
429+ ../.venv/bin/ python activation_tests.py --no-gui "nextcloudpi.local" 443 4443 || {
417430 echo "Activation test failed!"
418431 echo "Geckodriver logs:"
419432 tail -n 20 geckodriver.log >&2 || true
@@ -422,7 +435,7 @@ jobs:
422435 sudo "$LXC" exec ncp -- "tail -n20 /var/log/ncp.log" || true
423436 exit 1
424437 }
425- python nextcloud_tests.py --skip-release-check --no-gui "nextcloudpi.local" 443 4443 || {
438+ ../.venv/bin/ python nextcloud_tests.py --skip-release-check --no-gui "nextcloudpi.local" 443 4443 || {
426439 echo "Nextcloud test failed!"
427440 echo "Geckodriver logs:"
428441 tail -n 20 geckodriver.log >&2 || true
@@ -435,8 +448,15 @@ jobs:
435448 sudo "$LXC" exec ncp -- cat "$datadir/nextcloud.log" || true
436449 exit 1
437450 }
438- USE_INCUS="$USE_INCUS" python system_tests.py --non-interactive --skip-update-test || {
451+ sleep 10
452+ USE_INCUS="$USE_INCUS" ../.venv/bin/python system_tests.py --non-interactive --skip-update-test || {
439453 echo "System test failed!"
454+ echo "ncp.log: "
455+ sudo "$LXC" exec ncp -- "tail -n20 /var/log/ncp.log" || true
456+ echo "================"
457+ echo "nextcloud log: "
458+ datadir="$(sudo "$LXC" exec ncp -- ncc config:system:get datadirectory)"
459+ sudo "$LXC" exec ncp -- cat "$datadir/nextcloud.log" || true
440460 exit 1
441461 }
442462
@@ -457,7 +477,7 @@ jobs:
457477 echo "Running update to ${VERSION}"
458478
459479 current_nc_version="$(sudo "$LXC" exec ncp -- ncc status | grep "version:" | awk '{ print $3 }')"
460- latest_nc_version="27.1.6 "
480+ latest_nc_version="28.0.14 "
461481
462482 sudo "$LXC" exec ncp -- apt-get update ||:
463483 sudo "$LXC" exec ncp -- apt-get install --no-install-recommends -y gnupg2
@@ -466,13 +486,13 @@ jobs:
466486 sudo "$LXC" exec ncp -- bash -c "DBG=x ncp-update ${UPDATE_ARGS[*]}"
467487 sudo "$LXC" exec ncp -- /usr/local/bin/ncc status
468488
469- if [[ "$current_nc_version" =~ "$latest_nc_version".* ]]
470- then
471- echo "Nextcloud is up to date - skipping NC update test."
472- else
473- sudo "$LXC" exec ncp -- bash -c "DBG=x ncp-update-nc ${latest_nc_version?}"
474- sudo "$LXC" exec ncp -- /usr/local/bin/ncc status
475- fi
489+ # if [[ "$current_nc_version" =~ "$latest_nc_version".* ]]
490+ # then
491+ # echo "Nextcloud is up to date - skipping NC update test."
492+ # else
493+ # sudo "$LXC" exec ncp -- bash -c "DBG=x ncp-update-nc ${latest_nc_version?}"
494+ # sudo "$LXC" exec ncp -- /usr/local/bin/ncc status
495+ # fi
476496
477497 sudo "$LXC" exec ncp -- rm -f /opt/ncdata/data/nextcloud.log
478498
@@ -493,7 +513,10 @@ jobs:
493513 - name : Test LXD Image
494514 working-directory : ./tests
495515 run : |
496- python nextcloud_tests.py --no-gui --skip-release-check "nextcloudpi.local" 443 4443 || {
516+ set -x
517+ export GECKODRIVER_PATH="$GECKODRIVER_PATH"
518+ export FF_BINARY_PATH="$(which firefox)"
519+ ../.venv/bin/python nextcloud_tests.py --no-gui --skip-release-check "nextcloudpi.local" 443 4443 || {
497520 echo "Nextcloud test failed!"
498521 echo "Geckodriver logs:"
499522 tail -n 20 geckodriver.log >&2 || true
@@ -507,7 +530,7 @@ jobs:
507530 exit 1
508531 }
509532 sudo "$LXC" exec ncp -- bash -c 'tail -f /var/log/ncp.log' |& awk '{ print "NCP::" $0 }' &
510- USE_INCUS="$USE_INCUS" python system_tests.py --non-interactive --skip-update-test || {
533+ USE_INCUS="$USE_INCUS" ../.venv/bin/ python system_tests.py --non-interactive --skip-update-test || {
511534 echo "System test failed!"
512535 exit 1
513536 }
@@ -572,8 +595,11 @@ jobs:
572595 - name : Test LXD Image
573596 working-directory : ./tests
574597 run : |
598+ set -x
599+ export GECKODRIVER_PATH="$GECKODRIVER_PATH"
600+ export FF_BINARY_PATH="$(which firefox)"
575601 sudo "$LXC" exec ncp -- bash -c 'tail -f /var/log/ncp.log' |& awk '{ print "NCP::" $0 }' &
576- python nextcloud_tests.py --no-gui "nextcloudpi.local" 443 4443 || {
602+ ../.venv/bin/ python nextcloud_tests.py --no-gui "nextcloudpi.local" 443 4443 || {
577603 echo "Nextcloud test failed!"
578604 echo "Geckodriver logs:"
579605 tail -n 20 geckodriver.log >&2 || true
@@ -586,7 +612,7 @@ jobs:
586612 sudo "$LXC" exec ncp -- cat "$datadir/nextcloud.log" || true
587613 exit 1
588614 }
589- USE_INCUS="$USE_INCUS" python system_tests.py --non-interactive || {
615+ USE_INCUS="$USE_INCUS" ../.venv/bin/ python system_tests.py --non-interactive || {
590616 echo "System test failed!"
591617 exit 1
592618 }
@@ -612,32 +638,41 @@ jobs:
612638 - name : Setup incus
613639 if : ${{ needs.determine-runner.outputs.runner_label != 'ubuntu-20.04-arm64' }}
614640 run : |
615- curl https://pkgs.zabbly.com/get/incus-stable | sudo sh -x
641+ sudo apt-get install -y incus qemu-system incus-tools
616642 sudo iptables -I DOCKER-USER -i incusbr0 -j ACCEPT
617643 sudo iptables -I DOCKER-USER -o incusbr0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
618644 sudo incus admin init --auto
619645 - name : Setup Firefox
646+ if : ${{ runner.arch != 'ARM64' }}
620647 continue-on-error : true
621648 id : setup-firefox-browser-action
622649 uses : browser-actions/setup-firefox@latest
623650 - name : Setup Firefox from packages
624- if : ${{ steps.setup-firefox-browser-action.outcome == 'failure' }}
651+ if : ${{ runner.arch == 'ARM64' || steps.setup-firefox-browser-action.outcome == 'failure' }}
625652 run : |
653+ sudo apt-get update
626654 sudo apt-get install -y --no-install-recommends firefox
627655 - name : Setup GeckoDriver
628656 env :
629657 GH_TOKEN : ${{ github.token }}
630658 run : |
659+ set -x
631660 arch=linux64
632- if [[ "$RUNNER_ARCH " == "ARM64" ]]
661+ if [[ "${{ runner.arch }} " == "ARM64" ]]
633662 then
634663 arch="linux-aarch64"
635664 fi
636665 gh release download -R mozilla/geckodriver -p 'geckodriver-*-'"$arch.tar.gz"
637666 tar xf "geckodriver-"*"-$arch.tar.gz"
638667 sudo mv geckodriver /usr/local/bin/
668+ sudo chmod +x /usr/local/bin/geckodriver
669+ echo "GECKODRIVER_PATH=/usr/local/bin/geckodriver" >> "$GITHUB_ENV"
670+ geckodriver -V
639671 - name : Setup Selenium
640- run : pip install selenium
672+ run : |
673+ sudo apt-get install -y python3-venv
674+ python3 -m venv ./.venv
675+ ./.venv/bin/pip install selenium
641676 - name : download LXD image from artifact store
642677 uses : actions/download-artifact@v4
643678 with :
@@ -668,8 +703,11 @@ jobs:
668703 - name : Test LXD Image
669704 working-directory : ./tests
670705 run : |
706+ set -x
707+ export GECKODRIVER_PATH="$GECKODRIVER_PATH"
708+ export FF_BINARY_PATH="$(which firefox)"
671709 sudo "$LXC" exec ncp -- bash -c 'tail -f /var/log/ncp.log' |& awk '{ print "NCP::" $0 }' &
672- python activation_tests.py --no-gui "nextcloudpi.local" 443 4443 || {
710+ ../.venv/bin/ python activation_tests.py --no-gui "nextcloudpi.local" 443 4443 || {
673711 echo "Activation test failed!"
674712 echo "Geckodriver logs:"
675713 tail -n 20 geckodriver.log >&2 || true
@@ -682,7 +720,7 @@ jobs:
682720 sudo "$LXC" exec ncp -- cat "$datadir/nextcloud.log" || true
683721 exit 1
684722 }
685- python nextcloud_tests.py --no-gui "nextcloudpi.local" 443 4443 || {
723+ ../.venv/bin/ python nextcloud_tests.py --no-gui "nextcloudpi.local" 443 4443 || {
686724 echo "Nextcloud test failed!"
687725 echo "Geckodriver logs:"
688726 tail -n 20 geckodriver.log >&2 || true
@@ -695,7 +733,7 @@ jobs:
695733 sudo "$LXC" exec ncp -- cat "$datadir/nextcloud.log" || true
696734 exit 1
697735 }
698- USE_INCUS="$USE_INCUS" python system_tests.py --non-interactive || {
736+ USE_INCUS="$USE_INCUS" ../.venv/bin/ python system_tests.py --non-interactive || {
699737 echo "System test failed!"
700738 exit 1
701739 }
0 commit comments