Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthecalcaholic <6317548+theCalcaholic@users.noreply.github.com>2022-09-28 21:34:26 +0300
committerthecalcaholic <6317548+theCalcaholic@users.noreply.github.com>2022-09-28 21:34:26 +0300
commita6aaa4abe8a2df9d8b3255eaae5ba16d1a616ccf (patch)
tree9de083c17a4bf726948c00f381feef49059ad2b7 /.github
parentfc79b722f227af156d86c670c7072119fb252fbd (diff)
lamp.sh: Create systemd users manually, prevent changed uids
build-docker.yml: Add update tests Signed-off-by: thecalcaholic <6317548+theCalcaholic@users.noreply.github.com>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build-docker.yml116
1 files changed, 116 insertions, 0 deletions
diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml
index 0a9b91a0..bae34c1d 100644
--- a/.github/workflows/build-docker.yml
+++ b/.github/workflows/build-docker.yml
@@ -61,6 +61,122 @@ jobs:
docker push "thecalcaholic/ncp-internal-${{ matrix.arch }}:${{ github.run_id }}"
docker push "thecalcaholic/ncp-internal-${{ matrix.arch }}:${{ github.run_id }}-testing"
+ update-from-latest:
+ needs:
+ - build
+ runs-on: ubuntu-latest
+ env:
+ VERSION: "${{ inputs.git_ref || github.ref }}"
+
+ strategy:
+ matrix:
+ arch:
+ - armhf
+ - x86
+ - arm64
+ fail-fast: false
+ steps:
+ - name: Set up QEMU
+ uses: docker/setup-qemu-action@v1
+
+ - name: Start ncp container
+ run: |
+ docker volume create ncdata
+ docker run --platform "linux/${{ matrix.arch }}" -v ncdata:/data -d --rm -p 8443:443 -p 4443:4443 --name nextcloudpi ownyourbits/nextcloudpi:latest
+
+ - name: Checkout code
+ uses: actions/checkout@v3
+ with:
+ ref: "${{ env.VERSION }}"
+
+ - name: Setup Firefox
+ uses: browser-actions/setup-firefox@latest
+ - name: Setup GeckoDriver
+ uses: browser-actions/setup-geckodriver@latest
+ - name: Setup Selenium
+ run: pip install selenium
+
+ - name: Activate container
+ working-directory: ./tests
+ run: |
+ docker logs nextcloudpi |& awk '{ print "CONTAINER::" $0 }'
+ echo 'CONTAINER:: =========='
+ docker logs -f nextcloudpi |& awk '{ print "CONTAINER::" $0 }' &
+ docker exec nextcloudpi bash -c 'tail -f /var/log/ncp.log' |& awk '{ print "NCP::" $0 }' &
+ cmd=(python activation_tests.py --no-gui localhost 8443 4443)
+ [[ "${{ matrix.arch }}" == "x86" ]] || cmd+=(--timeout 300)
+
+ success=false
+ for attempt in {1..3}
+ do
+ echo ":: Activation Tests (attempt $attempt/3) ::"
+ "${cmd[@]}" || {
+ tail -n 20 geckodriver.log >&2 || true
+ echo "CI:: Activation test (attempt $attempt/3) failed!"
+ docker exec nextcloudpi bash /usr/local/bin/ncp-diag
+ sleep 12
+ continue
+ }
+ success=true
+ break
+ done
+ [[ "$success" == "true" ]] || {
+ echo "CI:: Activation test failed in all attempts!"
+ exit 1
+ }
+ echo "CI:: Activation test successful"
+ - name: Start new container
+ run: |
+ docker stop nextcloudpi
+ docker run -d -v ncdata:/data --rm -p 8443:443 -p 4443:4443 --name nextcloudpi thecalcaholic/ncp-internal-${{ matrix.arch }}:${{ github.run_id }}-testing
+ - name: Integration Tests
+ working-directory: ./tests
+ run: |
+ docker logs nextcloudpi |& awk '{ print "CONTAINER::" $0 }'
+ echo 'CONTAINER:: =========='
+ docker logs -f nextcloudpi |& awk '{ print "CONTAINER::" $0 }' &
+ docker exec nextcloudpi bash -c 'tail -f /var/log/ncp.log' |& awk '{ print "NCP::" $0 }' &
+ cmd=(python activation_tests.py --no-gui localhost 8443 4443)
+ [[ "${{ matrix.arch }}" == "x86" ]] || cmd+=(--timeout 300)
+
+ success=false
+ for attempt in {1..3}
+ do
+ echo ":: System Tests (attempt $attempt/3) ::"
+ python system_tests.py --no-ping --non-interactive || {
+ echo "CI:: System test (attempt $attempt) failed!"
+ continue
+ }
+ success=true
+ break
+ done
+ [[ "$success" == "true" ]] || {
+ echo "CI:: System test failed in all attempts!"
+ exit 1
+ }
+ echo "CI:: System test successful"
+
+ success=false
+ for attempt in {1..3}
+ do
+ echo ":: Nextcloud Tests (attempt $attempt/3) ::"
+ python nextcloud_tests.py --no-gui localhost 8443 4443 || {
+ tail -n 20 geckodriver.log >&2 || true
+ echo "CI:: Nextcloud test (attempt $attempt/3) failed!"
+ continue
+ }
+ success=true
+ break
+ done
+ [[ "$success" == "true" ]] || {
+ echo "CI:: Nextcloud test failed in all attempts!"
+ exit 1
+ }
+ echo "CI:: Nextcloud test successful"
+
+
+
+
test:
needs:
- build