Browse Source

Try to run build in parallel. (#1198)

* Try to run build in parallel.

* Another test

* Adjust release

* Individual docker files.

* Another fix.

* Use correct test flags.

* Also adapt release.yml

* Disable summary.

* Fix warnings.

* Also disable upload.
pull/1200/head
Sebastian Stehle 2 years ago
committed by GitHub
parent
commit
65365cc2b9
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 282
      .github/workflows/dev.yml
  2. 201
      .github/workflows/release.yml
  3. 9
      backend/src/Squidex.Data.EntityFramework/Providers/MySql/Content/Migrations/.editorconfig
  4. 9
      backend/src/Squidex.Data.EntityFramework/Providers/Postgres/Content/Migrations/.editorconfig
  5. 9
      backend/src/Squidex.Data.EntityFramework/Providers/SqlServer/Content/Migrations/.editorconfig
  6. 9
      backend/src/Squidex.Data.EntityFramework/TableName.cs
  7. 2
      backend/tests/Squidex.Data.Tests/EntityFramework/Domain/Contents/Text/EFTextIndexTests.cs
  8. 4
      tools/TestSuite/docker-compose-base.yml
  9. 54
      tools/TestSuite/docker-compose-mysql.yml
  10. 46
      tools/TestSuite/docker-compose-postgres.yml
  11. 54
      tools/TestSuite/docker-compose-sqlserver.yml
  12. 177
      tools/TestSuite/docker-compose.yml

282
.github/workflows/dev.yml

@ -12,193 +12,247 @@ on:
- 'release/*' - 'release/*'
jobs: jobs:
build_test: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Prepare - Checkout - name: Prepare - Checkout
uses: actions/checkout@v4.2.2 uses: actions/checkout@v4.2.2
- name: Prepare - Inject short Variables - name: Prepare - Setup Docker Buildx
uses: rlespinasse/github-slug-action@v5.0.0 uses: docker/setup-buildx-action@v3.10.0
- name: Prepare - Setup QEMU - name: Build
uses: docker/setup-qemu-action@v3.6.0 uses: docker/build-push-action@v6.15.0
env:
DOCKER_BUILD_RECORD_UPLOAD: false
with:
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: squidex-local
test-containers:
runs-on: ubuntu-latest
needs: build
steps:
- name: Prepare - Checkout
uses: actions/checkout@v4.2.2
- name: Prepare - Setup DotNet
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Test - TestContainers
run: dotnet test backend/Squidex.sln --filter Category==TestContainers
test-mongo:
runs-on: ubuntu-latest
needs: build
steps:
- name: Prepare - Checkout
uses: actions/checkout@v4.2.2
- name: Prepare - Setup Docker Buildx - name: Prepare - Setup Docker Buildx
uses: docker/setup-buildx-action@v3.10.0 uses: docker/setup-buildx-action@v3.10.0
- name: Prepare - Setup DotNet
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Prepare - Setup Node - name: Prepare - Setup Node
uses: actions/setup-node@v4.2.0 uses: actions/setup-node@v4.2.0
with: with:
node-version: 18 node-version: 18
- name: Build - BUILD - name: Build
uses: docker/build-push-action@v6.15.0 uses: docker/build-push-action@v6.15.0
env:
DOCKER_BUILD_RECORD_UPLOAD: false
DOCKER_BUILD_SUMMARY: false
with: with:
load: true load: true
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max
tags: squidex-local tags: squidex-local
- name: Build - TestContainers - name: Start Compose
if: github.event_name == 'pull_request'
uses: kohlerdominik/docker-run-action@v2.0.0
with:
image: mcr.microsoft.com/dotnet/sdk:8.0
default_network: host
volumes: ${{ github.workspace }}:/src
run: dotnet test /src/backend/Squidex.sln --filter Category==TestContainers
- name: Test - Start Compose
if: github.event_name == 'pull_request'
run: docker compose up -d run: docker compose up -d
working-directory: tools/TestSuite working-directory: tools/TestSuite
- name: Test - RUN on Mongo - name: RUN on Mongo
if: github.event_name == 'pull_request' run: dotnet test tools/TestSuite/TestSuite.ApiTests/TestSuite.ApiTests.csproj --filter Category!=NotAutomated
uses: kohlerdominik/docker-run-action@v2.0.0 env:
with: CONFIG__BACKUPURL: http://localhost:5000
image: mcr.microsoft.com/dotnet/sdk:8.0 CONFIG__WAIT: 60
environment: | CONFIG__SERVER__URL: http://localhost:8080
CONFIG__BACKUPURL=http://localhost:5000 WEBHOOKCATCHER__HOST__ENDPOINT: webhookcatcher
CONFIG__WAIT=60
CONFIG__SERVER__URL=http://localhost:8080 - name: RUN on Mongo on path with worker
WEBHOOKCATCHER__HOST__ENDPOINT=webhookcatcher run: dotnet test tools/TestSuite/TestSuite.ApiTests/TestSuite.ApiTests.csproj --filter Category!=NotAutomated
default_network: host env:
options: --name test1 CONFIG__BACKUPURL: http://localhost:5000
volumes: ${{ github.workspace }}:/src CONFIG__WAIT: 60
run: dotnet test /src/tools/TestSuite/TestSuite.ApiTests/TestSuite.ApiTests.csproj --filter Category!=NotAutomated CONFIG__SERVER__URL: http://localhost:8081/squidex
WEBHOOKCATCHER__HOST__ENDPOINT: webhookcatcher
- name: Test - RUN on Mongo on path
if: github.event_name == 'pull_request' - name: Install Playwright Dependencies
uses: kohlerdominik/docker-run-action@v2.0.0
with:
image: mcr.microsoft.com/dotnet/sdk:8.0
environment: |
CONFIG__BACKUPURL=http://localhost:5000
CONFIG__WAIT=60
CONFIG__SERVER__URL=http://localhost:8081/squidex
WEBHOOKCATCHER__HOST__ENDPOINT=webhookcatcher
default_network: host
options: --name test5
volumes: ${{ github.workspace }}:/src
run: dotnet test /src/tools/TestSuite/TestSuite.ApiTests/TestSuite.ApiTests.csproj --filter Category!=NotAutomated
- name: Test - RUN on Postgres
if: github.event_name == 'pull_request'
uses: kohlerdominik/docker-run-action@v2.0.0
with:
image: mcr.microsoft.com/dotnet/sdk:8.0
environment: |
CONFIG__BACKUPURL=http://localhost:5000
CONFIG__WAIT=60
CONFIG__SERVER__URL=http://localhost:8082
WEBHOOKCATCHER__HOST__ENDPOINT=webhookcatcher
default_network: host
options: --name test2
volumes: ${{ github.workspace }}:/src
run: dotnet test /src/tools/TestSuite/TestSuite.ApiTests/TestSuite.ApiTests.csproj --filter "Category!=NotAutomated & Category!=MongoOnly"
- name: Test - RUN on MySql
if: github.event_name == 'pull_request'
uses: kohlerdominik/docker-run-action@v2.0.0
with:
image: mcr.microsoft.com/dotnet/sdk:8.0
environment: |
CONFIG__BACKUPURL=http://localhost:5000
CONFIG__WAIT=60
CONFIG__SERVER__URL=http://localhost:8083
WEBHOOKCATCHER__HOST__ENDPOINT=webhookcatcher
default_network: host
options: --name test3
volumes: ${{ github.workspace }}:/src
run: dotnet test /src/tools/TestSuite/TestSuite.ApiTests/TestSuite.ApiTests.csproj --filter "Category!=NotAutomated & Category!=MongoOnly"
- name: Test - RUN on SqlServer
if: github.event_name == 'pull_request'
uses: kohlerdominik/docker-run-action@v2.0.0
with:
image: mcr.microsoft.com/dotnet/sdk:8.0
environment: |
CONFIG__BACKUPURL=http://localhost:5000
CONFIG__WAIT=60
CONFIG__SERVER__URL=http://localhost:8084
WEBHOOKCATCHER__HOST__ENDPOINT=webhookcatcher
default_network: host
options: --name test4
volumes: ${{ github.workspace }}:/src
run: dotnet test /src/tools/TestSuite/TestSuite.ApiTests/TestSuite.ApiTests.csproj --filter "Category!=NotAutomated & Category!=MongoOnly"
- name: Test - Install Playwright Dependencies
if: github.event_name == 'pull_request'
run: npm ci run: npm ci
working-directory: './tools/e2e' working-directory: './tools/e2e'
- name: Test - Install Playwright Browsers - name: Install Playwright Browsers
if: github.event_name == 'pull_request'
run: npx playwright install --with-deps run: npx playwright install --with-deps
working-directory: './tools/e2e' working-directory: './tools/e2e'
- name: Test - Run Playwright Tests - name: Run Playwright Tests
if: github.event_name == 'pull_request'
run: npx playwright test --retries=3 run: npx playwright test --retries=3
working-directory: './tools/e2e' working-directory: './tools/e2e'
env: env:
BASE__URL: http://localhost:8080 BASE__URL: http://localhost:8080
- name: Test - Upload Playwright Artifacts - name: Upload Playwright Artifacts
if: github.event_name == 'pull_request' && always() if: always()
uses: actions/upload-artifact@v4.6.1 uses: actions/upload-artifact@v4.6.1
with: with:
name: playwright-report name: playwright-report
path: tools/e2e/playwright-report/ path: tools/e2e/playwright-report/
retention-days: 30 retention-days: 30
- name: Test - Dump docker logs on failure - name: Dump docker logs on failure
if: github.event_name == 'pull_request' && failure() if: failure()
uses: jwalton/gh-docker-logs@v2.2.2 uses: jwalton/gh-docker-logs@v2.2.2
with: with:
dest: './docker-logs' dest: './docker-logs'
- name: Test - Upload docker logs - name: Upload docker logs
if: github.event_name == 'pull_request' && failure() if: failure()
uses: actions/upload-artifact@v4.6.1 uses: actions/upload-artifact@v4.6.1
with: with:
name: docker-logs name: docker-logs
path: './docker-logs' path: './docker-logs'
- name: Test - Cleanup - name: Cleanup
if: github.event_name == 'pull_request' && always() if: always()
run: docker compose down run: docker compose down
working-directory: tools/TestSuite working-directory: tools/TestSuite
- name: Publish - Remove unnecessary files test-sql:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
include:
- name: mysql
compose: docker-compose-mysql.yml
- name: postgres
compose: docker-compose-postgres.yml
- name: sqlserver
compose: docker-compose-sqlserver.yml
steps:
- name: Prepare - Checkout
uses: actions/checkout@v4.2.2
- name: Prepare - Setup Docker Buildx
uses: docker/setup-buildx-action@v3.10.0
- name: Prepare - Setup DotNet
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Prepare - Setup Node
uses: actions/setup-node@v4.2.0
with:
node-version: 18
- name: Build
uses: docker/build-push-action@v6.15.0
env:
DOCKER_BUILD_RECORD_UPLOAD: false
DOCKER_BUILD_SUMMARY: false
with:
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: squidex-local
- name: Start Compose
run: docker compose -f ${{ matrix.compose }} up -d
working-directory: tools/TestSuite
- name: RUN on ${{ matrix.name }}
run: dotnet test tools/TestSuite/TestSuite.ApiTests/TestSuite.ApiTests.csproj --filter "Category!=NotAutomated & Category!=MongoOnly"
env:
CONFIG__BACKUPURL: http://localhost:5000
CONFIG__WAIT: 60
CONFIG__SERVER__URL: http://localhost:8080
WEBHOOKCATCHER__HOST__ENDPOINT: webhookcatcher
- name: Dump docker logs on failure
if: failure()
uses: jwalton/gh-docker-logs@v2.2.2
with:
dest: './docker-logs'
- name: Upload docker logs
if: failure()
uses: actions/upload-artifact@v4.6.1
with:
name: docker-logs-${{ matrix.name }}
path: './docker-logs'
- name: Cleanup
if: always()
run: docker compose down
working-directory: tools/TestSuite
publish:
runs-on: ubuntu-latest
needs: [test-containers, test-mongo, test-sql]
steps:
- name: Prepare - Checkout
uses: actions/checkout@v4.2.2
- name: Prepare - Inject short Variables
uses: rlespinasse/github-slug-action@v5.0.0
- name: Prepare - Setup QEMU
uses: docker/setup-qemu-action@v3.6.0
- name: Prepare - Setup Docker Buildx
uses: docker/setup-buildx-action@v3.10.0
- name: Prepare - Remove unnecessary files
run: | run: |
sudo rm -rf /usr/share/dotnet sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY" sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Publish - Calculate Version - name: Calculate Version
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
env: env:
BUILD_NUMBER: ${{ github.run_number }} BUILD_NUMBER: ${{ github.run_number }}
run: | run: |
echo "BUILD_NUMBER=$(($BUILD_NUMBER + 6000))" >> $GITHUB_ENV echo "BUILD_NUMBER=$(($BUILD_NUMBER + 6000))" >> $GITHUB_ENV
- name: Publish - Login to Docker Hub - name: Login to Docker Hub
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: docker/login-action@v3.3.0 uses: docker/login-action@v3.3.0
with: with:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
- name: Publish - Build & Push for Multi-Platforms - name: Build & Push for Multi-Platforms
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: docker/build-push-action@v6.15.0 uses: docker/build-push-action@v6.15.0
env:
DOCKER_BUILD_RECORD_UPLOAD: false
with: with:
push: true
build-args: "SQUIDEX__RUNTIME__VERSION=7.0.0-dev-${{ env.BUILD_NUMBER }}" build-args: "SQUIDEX__RUNTIME__VERSION=7.0.0-dev-${{ env.BUILD_NUMBER }}"
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
tags: squidex/squidex:dev,squidex/squidex:dev-${{ env.BUILD_NUMBER }} tags: squidex/squidex:dev,squidex/squidex:dev-${{ env.BUILD_NUMBER }}
push: true

201
.github/workflows/release.yml

@ -7,68 +7,106 @@ on:
- "*" - "*"
jobs: jobs:
build_test: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Prepare - Checkout - name: Prepare - Checkout
uses: actions/checkout@v4.2.2 uses: actions/checkout@v4.2.2
- name: Prepare - Inject short Variables - name: Prepare - Setup Docker Buildx
uses: rlespinasse/github-slug-action@v5.0.0 uses: docker/setup-buildx-action@v3.10.0
- name: Prepare - Setup QEMU - name: Build
uses: docker/setup-qemu-action@v3.6.0 uses: docker/build-push-action@v6.15.0
env:
DOCKER_BUILD_RECORD_UPLOAD: false
with:
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: squidex-local
test-containers:
runs-on: ubuntu-latest
needs: build
steps:
- name: Prepare - Checkout
uses: actions/checkout@v4.2.2
- name: Prepare - Setup DotNet
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Test - TestContainers
run: dotnet test backend/Squidex.sln --filter Category==TestContainers
test-mongo:
runs-on: ubuntu-latest
needs: build
steps:
- name: Prepare - Checkout
uses: actions/checkout@v4.2.2
- name: Prepare - Setup Docker Buildx - name: Prepare - Setup Docker Buildx
uses: docker/setup-buildx-action@v3.10.0 uses: docker/setup-buildx-action@v3.10.0
- name: Prepare - Setup DotNet
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Prepare - Setup Node - name: Prepare - Setup Node
uses: actions/setup-node@v4.2.0 uses: actions/setup-node@v4.2.0
with: with:
node-version: 18 node-version: 18
- name: Build - BUILD - name: Build
uses: docker/build-push-action@v6.15.0 uses: docker/build-push-action@v6.15.0
env:
DOCKER_BUILD_RECORD_UPLOAD: false
DOCKER_BUILD_SUMMARY: false
with: with:
load: true load: true
build-args: "SQUIDEX__BUILD__VERSION=${{ env.GITHUB_REF_SLUG }},SQUIDEX__RUNTIME__VERSION=${{ env.GITHUB_REF_SLUG }}"
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max
tags: squidex-local tags: squidex-local
- name: Test - Start Compose - name: Start Compose
run: docker compose up -d run: docker compose up -d
working-directory: tools/TestSuite working-directory: tools/TestSuite
- name: Test - RUN - name: RUN on Mongo
uses: kohlerdominik/docker-run-action@v2.0.0 run: dotnet test tools/TestSuite/TestSuite.ApiTests/TestSuite.ApiTests.csproj --filter Category!=NotAutomated
with: env:
image: mcr.microsoft.com/dotnet/sdk:8.0 CONFIG__BACKUPURL: http://localhost:5000
environment: | CONFIG__WAIT: 60
CONFIG__BACKUPURL=http://localhost:5000 CONFIG__SERVER__URL: http://localhost:8080
CONFIG__WAIT=60 WEBHOOKCATCHER__HOST__ENDPOINT: webhookcatcher
CONFIG__SERVER__URL=http://localhost:8080
WEBHOOKCATCHER__HOST__ENDPOINT=webhookcatcher - name: RUN on Mongo on path with worker
default_network: host run: dotnet test tools/TestSuite/TestSuite.ApiTests/TestSuite.ApiTests.csproj --filter Category!=NotAutomated
options: --name test1 env:
volumes: ${{ github.workspace }}:/src CONFIG__BACKUPURL: http://localhost:5000
run: dotnet test /src/tools/TestSuite/TestSuite.ApiTests/TestSuite.ApiTests.csproj --filter Category!=NotAutomated CONFIG__WAIT: 60
CONFIG__SERVER__URL: http://localhost:8081/squidex
- name: Test - Install Playwright Dependencies WEBHOOKCATCHER__HOST__ENDPOINT: webhookcatcher
- name: Install Playwright Dependencies
run: npm ci run: npm ci
working-directory: './tools/e2e' working-directory: './tools/e2e'
- name: Test - Install Playwright Browsers - name: Install Playwright Browsers
run: npx playwright install --with-deps run: npx playwright install --with-deps
working-directory: './tools/e2e' working-directory: './tools/e2e'
- name: Test - Run Playwright Tests - name: Run Playwright Tests
run: npx playwright test --retries=3 run: npx playwright test --retries=3
working-directory: './tools/e2e' working-directory: './tools/e2e'
env: env:
BASE__URL: http://localhost:8080 BASE__URL: http://localhost:8080
- name: Test - Upload Playwright Artifacts - name: Upload Playwright Artifacts
if: always() if: always()
uses: actions/upload-artifact@v4.6.1 uses: actions/upload-artifact@v4.6.1
with: with:
@ -76,51 +114,140 @@ jobs:
path: tools/e2e/playwright-report/ path: tools/e2e/playwright-report/
retention-days: 30 retention-days: 30
- name: Test - Dump docker logs on failure - name: Dump docker logs on failure
if: failure()
uses: jwalton/gh-docker-logs@v2.2.2
with:
dest: './docker-logs'
- name: Upload docker logs
if: failure()
uses: actions/upload-artifact@v4.6.1
with:
name: docker-logs
path: './docker-logs'
- name: Cleanup
if: always()
run: docker compose down
working-directory: tools/TestSuite
test-sql:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
include:
- name: mysql
compose: docker-compose-mysql.yml
- name: postgres
compose: docker-compose-postgres.yml
- name: sqlserver
compose: docker-compose-sqlserver.yml
steps:
- name: Prepare - Checkout
uses: actions/checkout@v4.2.2
- name: Prepare - Setup Docker Buildx
uses: docker/setup-buildx-action@v3.10.0
- name: Prepare - Setup DotNet
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Prepare - Setup Node
uses: actions/setup-node@v4.2.0
with:
node-version: 18
- name: Build
uses: docker/build-push-action@v6.15.0
env:
DOCKER_BUILD_RECORD_UPLOAD: false
DOCKER_BUILD_SUMMARY: false
with:
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: squidex-local
- name: Start Compose
run: docker compose -f ${{ matrix.compose }} up -d
working-directory: tools/TestSuite
- name: RUN on ${{ matrix.name }}
run: dotnet test tools/TestSuite/TestSuite.ApiTests/TestSuite.ApiTests.csproj --filter "Category!=NotAutomated & Category!=MongoOnly"
env:
CONFIG__BACKUPURL: http://localhost:5000
CONFIG__WAIT: 60
CONFIG__SERVER__URL: http://localhost:8080
WEBHOOKCATCHER__HOST__ENDPOINT: webhookcatcher
- name: Dump docker logs on failure
if: failure() if: failure()
uses: jwalton/gh-docker-logs@v2.2.2 uses: jwalton/gh-docker-logs@v2.2.2
with: with:
dest: './docker-logs' dest: './docker-logs'
- name: Test - Upload docker logs - name: Upload docker logs
if: failure() if: failure()
uses: actions/upload-artifact@v4.6.1 uses: actions/upload-artifact@v4.6.1
with: with:
name: docker-logs name: docker-logs-${{ matrix.name }}
path: './docker-logs' path: './docker-logs'
- name: Test - Cleanup - name: Cleanup
if: always() if: always()
run: docker compose down run: docker compose down
working-directory: tools/TestSuite working-directory: tools/TestSuite
publish:
runs-on: ubuntu-latest
needs: [test-containers, test-mongo, test-sql]
steps:
- name: Prepare - Checkout
uses: actions/checkout@v4.2.2
- name: Prepare - Inject short Variables
uses: rlespinasse/github-slug-action@v5.0.0
- name: Publish - Remove unnecessary files - name: Prepare - Setup QEMU
uses: docker/setup-qemu-action@v3.6.0
- name: Prepare - Setup Docker Buildx
uses: docker/setup-buildx-action@v3.10.0
- name: Prepare - Remove unnecessary files
run: | run: |
sudo rm -rf /usr/share/dotnet sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY" sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Publish - Get Major Version - name: Version - Calculate Major
id: version id: version
uses: rishabhgupta/split-by@v1.0.1 uses: rishabhgupta/split-by@v1.0.1
with: with:
string: "${{ env.GITHUB_REF_SLUG }}" string: "${{ env.GITHUB_REF_SLUG }}"
split-by: "." split-by: "."
- name: Publish - Check Tag - name: Version - Check Tag
id: normal-version id: normal-version
run: | run: |
if [[ ${{ env.GITHUB_REF_SLUG }} =~ ^[0-9]+\.[0-9]+(\.[0-9]+){0,2}$ ]]; then if [[ ${{ env.GITHUB_REF_SLUG }} =~ ^[0-9]+\.[0-9]+(\.[0-9]+){0,2}$ ]]; then
echo "STABLE_VERSION=true" >> $GITHUB_ENV echo "STABLE_VERSION=true" >> $GITHUB_ENV
fi fi
- name: Publish - Login to Docker Hub - name: Login to Docker Hub
uses: docker/login-action@v3.3.0 uses: docker/login-action@v3.3.0
with: with:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
- name: Publish - Build & Push for Multi-Platforms - name: Build & Push for Multi-Platforms
uses: docker/build-push-action@v6.15.0 uses: docker/build-push-action@v6.15.0
env:
DOCKER_BUILD_RECORD_UPLOAD: false
with: with:
build-args: "SQUIDEX__BUILD__VERSION=${{ env.GITHUB_REF_SLUG }},SQUIDEX__RUNTIME__VERSION=${{ env.GITHUB_REF_SLUG }}" build-args: "SQUIDEX__BUILD__VERSION=${{ env.GITHUB_REF_SLUG }},SQUIDEX__RUNTIME__VERSION=${{ env.GITHUB_REF_SLUG }}"
cache-from: type=gha cache-from: type=gha

9
backend/src/Squidex.Data.EntityFramework/Providers/MySql/Content/Migrations/.editorconfig

@ -0,0 +1,9 @@
[*.cs]
# MA0007: Add a comma after the last value
dotnet_diagnostic.MA0007.severity = none
# MA0048: File name must match type name
dotnet_diagnostic.MA0048.severity = none
# SA1633: File must have header
dotnet_diagnostic.SA1633.severity = none

9
backend/src/Squidex.Data.EntityFramework/Providers/Postgres/Content/Migrations/.editorconfig

@ -0,0 +1,9 @@
[*.cs]
# MA0007: Add a comma after the last value
dotnet_diagnostic.MA0007.severity = none
# MA0048: File name must match type name
dotnet_diagnostic.MA0048.severity = none
# SA1633: File must have header
dotnet_diagnostic.SA1633.severity = none

9
backend/src/Squidex.Data.EntityFramework/Providers/SqlServer/Content/Migrations/.editorconfig

@ -0,0 +1,9 @@
[*.cs]
# MA0007: Add a comma after the last value
dotnet_diagnostic.MA0007.severity = none
# MA0048: File name must match type name
dotnet_diagnostic.MA0048.severity = none
# SA1633: File must have header
dotnet_diagnostic.SA1633.severity = none

9
backend/src/Squidex.Data.EntityFramework/TableName.cs

@ -1,4 +1,11 @@
namespace Squidex; // ==========================================================================
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex UG (haftungsbeschraenkt)
// All rights reserved. Licensed under the MIT license.
// ==========================================================================
namespace Squidex;
public static class TableName public static class TableName
{ {

2
backend/tests/Squidex.Data.Tests/EntityFramework/Domain/Contents/Text/EFTextIndexTests.cs

@ -12,7 +12,7 @@ using Squidex.Infrastructure;
namespace Squidex.EntityFramework.Domain.Contents.Text; namespace Squidex.EntityFramework.Domain.Contents.Text;
public abstract class EFTextIndexTests<TContext>(ISqlFixture<TContext> fixture) : TextIndexerTests public abstract class EFTextIndexTests<TContext>(ISqlFixture<TContext> fixture) : TextIndexerTests
where TContext : DbContext, IDbContextWithDialect where TContext : DbContext, IDbContextWithDialect
{ {
public override bool SupportsQuerySyntax => false; public override bool SupportsQuerySyntax => false;

4
tools/TestSuite/docker-compose-base.yml

@ -19,6 +19,4 @@ services:
- STORE__MONGODB__CONFIGURATION=mongodb://db_mongo - STORE__MONGODB__CONFIGURATION=mongodb://db_mongo
- TEMPLATES__LOCALURL=http://localhost:5000 - TEMPLATES__LOCALURL=http://localhost:5000
- UI__HIDENEWS=true - UI__HIDENEWS=true
- UI__HIDEONBOARDING=true - UI__HIDEONBOARDING=true
networks:
- internal

54
tools/TestSuite/docker-compose-mysql.yml

@ -0,0 +1,54 @@
services:
db_mysql:
image: mysql
ports:
- "3306:3306"
environment:
- MYSQL_DATABASE=squidex
- MYSQL_USER=admin
- MYSQL_PASSWORD=secret
- MYSQL_ROOT_PASSWORD=secret
command: --log-bin-trust-function-creators=1 --local-infile=1
volumes:
- mysql_data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "admin", "--password=secret"]
interval: 10s
retries: 10
squidex_mysql:
extends:
file: docker-compose-base.yml
service: squidex_base
environment:
- EVENTSTORE__TYPE=Sql
- STORE__TYPE=Sql
- STORE__SQL__CONNECTIONSTRING=Server=db_mysql;Port=3306;Database=squidex;User=admin;Password=secret;AllowLoadLocalInfile=true;
- STORE__SQL__PROVIDER=MySql
- STORE__SQL__VERSION=9.2.0-mysql
- MESSAGING__TYPE=Sql
- URLS__BASEURL=http://localhost:8080
depends_on:
db_mysql:
condition: service_healthy
proxy_mysql:
image: squidex/caddy-proxy-path:2.6.2
ports:
- "8080:8080"
environment:
- SITE_ADDRESS=http://localhost:8080
- SITE_PATH=*
- SITE_SERVER="squidex_mysql:5000"
depends_on:
- squidex_mysql
restart: unless-stopped
webhookcatcher:
image: tarampampam/webhook-tester:2
command: serve --port 1026
ports:
- "1026:1026"
volumes:
mysql_data:

46
tools/TestSuite/docker-compose-postgres.yml

@ -0,0 +1,46 @@
services:
db_postgres:
image: "postgis/postgis"
ports:
- "5432:5432"
environment:
- POSTGRES_USER=admin
- POSTGRES_PASSWORD=secret
- POSTGRES_DB=squidex
healthcheck:
test: ["CMD-SHELL", "pg_isready -U admin"]
interval: 10s
retries: 10
squidex_postgres:
extends:
file: docker-compose-base.yml
service: squidex_base
environment:
- EVENTSTORE__TYPE=Sql
- STORE__TYPE=Sql
- STORE__SQL__CONNECTIONSTRING=Server=db_postgres;Port=5432;Database=squidex;Pooling=true;Username=admin;Password=secret;SSL Mode=Disable;
- STORE__SQL__PROVIDER=Postgres
- MESSAGING__TYPE=Sql
- URLS__BASEURL=http://localhost:8080
depends_on:
db_postgres:
condition: service_healthy
proxy_postgres:
image: squidex/caddy-proxy-path:2.6.2
ports:
- "8080:8080"
environment:
- SITE_ADDRESS=http://localhost:8080
- SITE_PATH=*
- SITE_SERVER="squidex_postgres:5000"
depends_on:
- squidex_postgres
restart: unless-stopped
webhookcatcher:
image: tarampampam/webhook-tester:2
command: serve --port 1026
ports:
- "1026:1026"

54
tools/TestSuite/docker-compose-sqlserver.yml

@ -0,0 +1,54 @@
services:
db_sqlserver:
image: squidex/mssql-dev:2
ports:
- "1433:1433"
environment:
- SA_PASSWORD=1q2w3e!R
- SA_USER=none
- ACCEPT_EULA=Y
healthcheck:
test: ["CMD-SHELL", "/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P 1q2w3e!R -Q 'SELECT 1'"]
interval: 10s
retries: 10
db_sqlserver_init:
image: mcr.microsoft.com/mssql-tools
entrypoint: >
/opt/mssql-tools/bin/sqlcmd -S db_sqlserver -U sa -P 1q2w3e!R -d master -Q 'CREATE DATABASE ''squidex'''
depends_on:
db_sqlserver:
condition: service_healthy
squidex_sqlserver:
extends:
file: docker-compose-base.yml
service: squidex_base
environment:
- EVENTSTORE__TYPE=Sql
- STORE__TYPE=Sql
- STORE__SQL__CONNECTIONSTRING=Server=db_sqlserver;Database=squidex;User=sa;Password=1q2w3e!R;TrustServerCertificate=True;
- STORE__SQL__PROVIDER=SqlServer
- MESSAGING__TYPE=Sql
- URLS__BASEURL=http://localhost:8080
depends_on:
db_sqlserver:
condition: service_healthy
proxy_sqlserver:
image: squidex/caddy-proxy-path:2.6.2
ports:
- "8080:8080"
environment:
- SITE_ADDRESS=http://localhost:8080
- SITE_PATH=*
- SITE_SERVER="squidex_sqlserver:5000"
depends_on:
- squidex_sqlserver
restart: unless-stopped
webhookcatcher:
image: tarampampam/webhook-tester:2
command: serve --port 1026
ports:
- "1026:1026"

177
tools/TestSuite/docker-compose.yml

@ -3,67 +3,6 @@ services:
image: mongo image: mongo
ports: ports:
- "27019:27017" - "27019:27017"
networks:
- internal
db_postgres:
image: "postgis/postgis"
ports:
- "5432:5432"
environment:
- POSTGRES_USER=admin
- POSTGRES_PASSWORD=secret
- POSTGRES_DB=squidex
networks:
- internal
healthcheck:
test: ["CMD-SHELL", "pg_isready -U admin"]
interval: 10s
retries: 10
db_mysql:
image: mysql
ports:
- "3306:3306"
environment:
- MYSQL_DATABASE=squidex
- MYSQL_USER=admin
- MYSQL_PASSWORD=secret
- MYSQL_ROOT_PASSWORD=secret
command: --log-bin-trust-function-creators=1 --local-infile=1
volumes:
- mysql_data:/var/lib/mysql
networks:
- internal
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "admin", "--password=secret"]
interval: 10s
retries: 10
db_sqlserver:
image: squidex/mssql-dev:2
ports:
- "1433:1433"
environment:
- SA_PASSWORD=1q2w3e!R
- SA_USER=none
- ACCEPT_EULA=Y
networks:
- internal
healthcheck:
test: ["CMD-SHELL", "/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P 1q2w3e!R -Q 'SELECT 1'"]
interval: 10s
retries: 10
db_sqlserver_init:
image: mcr.microsoft.com/mssql-tools
entrypoint: >
/opt/mssql-tools/bin/sqlcmd -S db_sqlserver -U sa -P 1q2w3e!R -d master -Q 'CREATE DATABASE ''squidex'''
networks:
- internal
depends_on:
db_sqlserver:
condition: service_healthy
# Base configuration # Base configuration
squidex_mongo: squidex_mongo:
@ -71,6 +10,7 @@ services:
file: docker-compose-base.yml file: docker-compose-base.yml
service: squidex_base service: squidex_base
environment: environment:
- ASSETS__RESIZERURL=http://resizer
- EVENTSTORE__MONGODB__DATABASE=squidex1 - EVENTSTORE__MONGODB__DATABASE=squidex1
- STORE__MONGODB__CONTENTDATABASE=squidex1_content - STORE__MONGODB__CONTENTDATABASE=squidex1_content
- STORE__MONGODB__DATABASE=squidex1 - STORE__MONGODB__DATABASE=squidex1
@ -110,65 +50,6 @@ services:
depends_on: depends_on:
- db_mongo - db_mongo
squidex_postgres:
extends:
file: docker-compose-base.yml
service: squidex_base
environment:
- EVENTSTORE__TYPE=Sql
- STORE__TYPE=Sql
- STORE__SQL__CONNECTIONSTRING=Server=db_postgres;Port=5432;Database=squidex;Pooling=true;Username=admin;Password=secret;SSL Mode=Disable;
- STORE__SQL__PROVIDER=Postgres
- MESSAGING__TYPE=Sql
- URLS__BASEURL=http://localhost:8082
depends_on:
db_postgres:
condition: service_healthy
squidex_mysql:
extends:
file: docker-compose-base.yml
service: squidex_base
environment:
- EVENTSTORE__TYPE=Sql
- STORE__TYPE=Sql
- STORE__SQL__CONNECTIONSTRING=Server=db_mysql;Port=3306;Database=squidex;User=admin;Password=secret;AllowLoadLocalInfile=true;
- STORE__SQL__PROVIDER=MySql
- STORE__SQL__VERSION=9.2.0-mysql
- MESSAGING__TYPE=Sql
- URLS__BASEURL=http://localhost:8083
depends_on:
db_mysql:
condition: service_healthy
squidex_sqlserver:
extends:
file: docker-compose-base.yml
service: squidex_base
environment:
- EVENTSTORE__TYPE=Sql
- STORE__TYPE=Sql
- STORE__SQL__CONNECTIONSTRING=Server=db_sqlserver;Database=squidex;User=sa;Password=1q2w3e!R;TrustServerCertificate=True;
- STORE__SQL__PROVIDER=SqlServer
- MESSAGING__TYPE=Sql
- URLS__BASEURL=http://localhost:8084
depends_on:
db_sqlserver:
condition: service_healthy
resizer:
image: squidex/resizer:1.3.0
networks:
- internal
webhookcatcher:
image: tarampampam/webhook-tester:2
command: serve --port 1026
ports:
- "1026:1026"
networks:
- internal
proxy_mongo: proxy_mongo:
image: squidex/caddy-proxy:2.6.2 image: squidex/caddy-proxy:2.6.2
ports: ports:
@ -179,8 +60,6 @@ services:
- SITE_SERVER="squidex_mongo:5000" - SITE_SERVER="squidex_mongo:5000"
depends_on: depends_on:
- squidex_mongo - squidex_mongo
networks:
- internal
restart: unless-stopped restart: unless-stopped
proxy_mongo_path: proxy_mongo_path:
@ -193,55 +72,13 @@ services:
- SITE_SERVER="squidex_mongo_path:5000" - SITE_SERVER="squidex_mongo_path:5000"
depends_on: depends_on:
- squidex_mongo_path - squidex_mongo_path
networks:
- internal
restart: unless-stopped restart: unless-stopped
proxy_postgres: resizer:
image: squidex/caddy-proxy-path:2.6.2 image: squidex/resizer:1.3.0
ports:
- "8082:8082"
environment:
- SITE_ADDRESS=http://localhost:8082
- SITE_PATH=*
- SITE_SERVER="squidex_postgres:5000"
depends_on:
- squidex_postgres
networks:
- internal
restart: unless-stopped
proxy_mysql:
image: squidex/caddy-proxy-path:2.6.2
ports:
- "8083:8083"
environment:
- SITE_ADDRESS=http://localhost:8083
- SITE_PATH=*
- SITE_SERVER="squidex_mysql:5000"
depends_on:
- squidex_mysql
networks:
- internal
restart: unless-stopped
proxy_sqlserver: webhookcatcher:
image: squidex/caddy-proxy-path:2.6.2 image: tarampampam/webhook-tester:2
command: serve --port 1026
ports: ports:
- "8084:8084" - "1026:1026"
environment:
- SITE_ADDRESS=http://localhost:8084
- SITE_PATH=*
- SITE_SERVER="squidex_sqlserver:5000"
depends_on:
- squidex_sqlserver
networks:
- internal
restart: unless-stopped
networks:
internal:
driver: bridge
volumes:
mysql_data:
Loading…
Cancel
Save