From f8322d83e5d076ed7aa14f6a8e01da5a549bd9eb Mon Sep 17 00:00:00 2001 From: Sebastian Date: Tue, 15 Aug 2023 16:12:39 +0200 Subject: [PATCH] Another test --- .fernignore | 7 +++-- .github/workflows/ci.yml | 4 +++ tests/docker-compose.yml | 58 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+), 2 deletions(-) create mode 100644 tests/docker-compose.yml diff --git a/.fernignore b/.fernignore index b894140..c305ce6 100644 --- a/.fernignore +++ b/.fernignore @@ -1,6 +1,6 @@ README.md -# Wrappers +# Wrappers **/ClientOptions.java # Client files @@ -11,5 +11,8 @@ src/main/java/com/squidex/api/*.* .github/workflows/ci.yml .github/workflows/test.yml -#tests +# Tests src/test/ + +# Docker Compose +tests diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1ed1c74..403bd40 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,6 +40,10 @@ jobs: - name: Test run: ./gradlew test + env: + CONFIG__WAIT: 60 + CONFIG__SERVER__URL: http://localhost:8080 + working-directory: . - name: Test - Dump docker logs on failure if: failure() diff --git a/tests/docker-compose.yml b/tests/docker-compose.yml new file mode 100644 index 0000000..5c13ff6 --- /dev/null +++ b/tests/docker-compose.yml @@ -0,0 +1,58 @@ +version: '3' +services: + mongo: + image: mongo:latest + ports: + - "27019:27017" + networks: + - internal + + squidex1: + image: squidex/squidex:7 + environment: + - URLS__BASEURL=http://localhost:8080 + - ASSETS__RESIZERURL=http://resizer + - EVENTSTORE__MONGODB__CONFIGURATION=mongodb://mongo + - EVENTSTORE__MONGODB__DATABASE=squidex1 + - GRAPHQL__CACHEDURATION=0 + - IDENTITY__ADMINCLIENTID=root + - IDENTITY__ADMINCLIENTSECRET=xeLd6jFxqbXJrfmNLlO2j1apagGGGSyZJhFnIuHp4I0= + - IDENTITY__MULTIPLEDOMAINS=true + - RULES__RULESCACHEDURATION=00:00:00 + - SCRIPTING__TIMEOUTEXECUTION=00:00:10 + - SCRIPTING__TIMEOUTSCRIPT=00:00:10 + - STORE__MONGODB__CONFIGURATION=mongodb://mongo + - STORE__MONGODB__DATABASE=squidex1 + - STORE__MONGODB__CONTENTDATABASE=squidex1_content + - STORE__TYPE=MongoDB + - TEMPLATES__LOCALURL=http://localhost:5000 + - ASPNETCORE_URLS=http://+:5000 + networks: + - internal + depends_on: + - mongo + + resizer: + image: squidex/resizer:dev-40 + networks: + - internal + depends_on: + - mongo + + squidex_proxy1: + image: squidex/caddy-proxy:2.6.2 + ports: + - "8080:8080" + environment: + - SITE_ADDRESS=http://localhost:8080 + - SITE_PATH=* + - SITE_SERVER="squidex1:5000" + depends_on: + - squidex1 + networks: + - internal + restart: unless-stopped + +networks: + internal: + driver: bridge \ No newline at end of file