mirror of
https://github.com/owncloud/ocis.git
synced 2026-10-23 23:29:02 +03:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.2 to 7.0.1. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v6.0.2...3d3c42e5aac5ba805825da76410c181273ba90b1) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 7.0.1 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
115 lines
4.1 KiB
YAML
115 lines
4.1 KiB
YAML
name: Test Deployment Examples
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: "0 1 * * *"
|
|
|
|
jobs:
|
|
test:
|
|
name: ${{ matrix.example }}
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 120
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- example: ocis_full
|
|
urls: "https://ocis.owncloud.test https://collabora.owncloud.test"
|
|
ocisUrls: "https://ocis.owncloud.test"
|
|
# - example: ocis_hello
|
|
# urls: "https://ocis.owncloud.test"
|
|
- example: ocis_ldap
|
|
urls: "https://ocis.owncloud.test https://ldap.owncloud.test"
|
|
ocisUrls: "https://ocis.owncloud.test"
|
|
- example: ocis_multi
|
|
urls: "https://ocis.owncloud.test https://ocis.ocm.owncloud.test https://keycloak.owncloud.test https://ldap.owncloud.test"
|
|
- example: ocis_ocm
|
|
urls: "https://ocis.owncloud.test https://ocis.ocm.owncloud.test https://ocis.ocm.next.owncloud.test https://collabora.ocm.owncloud.test https://onlyoffice.owncloud.test"
|
|
composeFiles: "-f docker-compose.yml -f ocis.yml -f ocis-ocm.yml -f ocis-ocm-next.yml -f collabora-ocm.yml -f onlyoffice.yml"
|
|
ocisUrls: "https://ocis.owncloud.test https://ocis.ocm.owncloud.test https://ocis.ocm.next.owncloud.test"
|
|
- example: ocis_keycloak
|
|
urls: "https://ocis.owncloud.test https://keycloak.owncloud.test"
|
|
|
|
steps:
|
|
- name: Checkout ocis repo
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
repository: owncloud/ocis
|
|
|
|
- name: Prepare hosts entry
|
|
run: |
|
|
echo "127.0.0.1 ocis.owncloud.test collabora.owncloud.test keycloak.owncloud.test mail.owncloud.test minio.owncloud.test onlyoffice.owncloud.test tika ldap.owncloud.test ocis.ocm.owncloud.test ocis.ocm.next.owncloud.test collabora.ocm.owncloud.test" | sudo tee -a /etc/hosts
|
|
|
|
- name: Run compose stack
|
|
working-directory: deployments/examples/${{ matrix.example }}
|
|
run: |
|
|
set -e
|
|
echo "=== Running ${{ matrix.example }} ==="
|
|
|
|
if [ "${{ matrix.example }}" = "ocis_ocm" ]; then
|
|
export INSECURE=true
|
|
export COLLABORA_SSL_ENABLE=false
|
|
export COLLABORA_SSL_VERIFICATION=false
|
|
fi
|
|
|
|
if [ -n "${{ matrix.ocisUrls }}" ]; then
|
|
export PROXY_ENABLE_BASIC_AUTH=true
|
|
fi
|
|
|
|
docker compose ${{ matrix.composeFiles }} up -d --wait --wait-timeout 120
|
|
|
|
- name: Wait for services
|
|
run: |
|
|
set -e
|
|
|
|
URLS="${{ matrix.urls }}"
|
|
|
|
for url in $URLS; do
|
|
echo "=== Waiting for $url ==="
|
|
|
|
end=$((SECONDS+150))
|
|
ready=false
|
|
|
|
while [ $SECONDS -lt $end ]; do
|
|
echo "Trying $url"
|
|
if curl -kfsS --max-time 5 "$url" > /dev/null; then
|
|
echo "✅ $url is ready"
|
|
ready=true
|
|
break
|
|
fi
|
|
echo "⏳ Not ready yet, retrying in 5s..."
|
|
sleep 5
|
|
done
|
|
|
|
if [ "$ready" = false ]; then
|
|
echo "❌ $url never became ready"
|
|
exit 1
|
|
fi
|
|
done
|
|
- name: Basic upload/download test
|
|
if: matrix.ocisUrls
|
|
run: |
|
|
set -e
|
|
|
|
for URL in ${{ matrix.ocisUrls }}; do
|
|
FILE="upload-test-$RANDOM.txt"
|
|
echo "hello from deployment-test $(date +%s)" > "$FILE"
|
|
|
|
echo "=== Uploading $FILE to $URL ==="
|
|
curl -kfsS -u admin:admin -T "$FILE" "$URL/remote.php/dav/files/admin/$FILE"
|
|
|
|
echo "=== Downloading $FILE back from $URL ==="
|
|
curl -kfsS -u admin:admin "$URL/remote.php/dav/files/admin/$FILE" -o "downloaded-$FILE"
|
|
|
|
echo "=== Verifying downloaded content matches what was uploaded ==="
|
|
diff "$FILE" "downloaded-$FILE"
|
|
echo "upload/download succeeded for $URL"
|
|
done
|
|
|
|
- name: Tear down
|
|
if: always()
|
|
working-directory: deployments/examples/${{ matrix.example }}
|
|
run: docker compose ${{ matrix.composeFiles }} down -v
|