Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.2 to 7.0.0. - [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/de0fac2e4500dabe0009e67214ff5f5447ce83dd...9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 7.0.0 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> Co-authored-by: Roman Perekhod <2403905@gmail.com>
79 lines
2.5 KiB
YAML
79 lines
2.5 KiB
YAML
name: test deployment example
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: "0 0 * * *" # every day at 00:00 UTC
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- example: ocis_full
|
|
urls: "https://ocis.owncloud.test"
|
|
- example: ocis_ldap
|
|
urls: "https://ocis.owncloud.test https://ldap.owncloud.test"
|
|
- example: ocis_multi
|
|
urls: "https://ocis.owncloud.test https://ocis.ocm.owncloud.test"
|
|
- example: ocis_ocm
|
|
urls: "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@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
with:
|
|
repository: owncloud/ocis
|
|
|
|
- name: Set up Docker Compose
|
|
uses: docker/setup-compose-action@16feee727cbdc83b6a014e6cc26fec4a79bcf30c # v2.2.0
|
|
|
|
- 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 onlyoffice.owncloud.test" | sudo tee -a /etc/hosts
|
|
|
|
- name: Run compose stack
|
|
working-directory: deployments/examples/${{ matrix.example }}
|
|
run: |
|
|
set -e
|
|
echo "=== Running ${{ matrix.example }} ==="
|
|
docker compose up -d
|
|
|
|
- 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: Tear down
|
|
if: always()
|
|
working-directory: deployments/examples/${{ matrix.example }}
|
|
run: docker compose down -v |