feat(ci): reinstate multiregion tests (#5365)

* feat(multiregion): replace user replication

* chore(multiregion): optimise replication

* maybe it's this

* postgres is fun

* once more

* chore(multiregion): only replicate test user creation during multiregion tests

* feat: improved replicate_query logic

* fix: minor

* fix: starting issue

* feat: included user create and delete specs to multiregion

* feat: removed console logs

* fix: user defaults

* fix: multiregion test helper

* fix: update scenarios for users

* refactor(multiregion): swap replicateQuery concept to asMultiregionOperation (#5301)

feat(multiregion): introduced asMultregionOperator, refactor test to user builder classes

* chore: renamings

* fix: remove comments

* feat: remove user replication

* refactor: simplified spec usages

* chore: comments

* chore: branches and favs

* chore: more tests

* chore: more tests

* fix linting

* fix tests

* feat: dropping replication

* refactor: moved project delete to service

* fix: comment

* feat: updateStreamFactory and updateProjectFacotry

* deleteProjectFactory + replicateFactory

* deleteWorkspaceFactory

* fix: selector

* fix: tests

* fix tests, finished createStreamFactory

* feat: simplify changes

* fix: remove comment

* fix: minor strucutres

* fix: moveProjectToRegion

* fix: moved branch creation outside of multiregion scope

* fix: branch creation

* fix: tests

* fix: ci tests

* fix: removed log form test

* fix: on specs, no random regionKeys

* feat: simplify ci for postgres

* try: fix health check

* feat: fixed tests in ci

* try: entrypoint

* try: entrypoint

* try: entrypoint

* try: POSTGRES_INITDB_ARGS

* feat: apply POSTGRES_INITDB_ARGS to all server tests

* fix: broken test

* fix: reinstate max health attempts

* fix: after merge

* fix: after merge

---------

Co-authored-by: Charles Driesler <chuck@speckle.systems>
This commit is contained in:
Daniel Gak Anagrov
2025-09-04 13:49:02 +01:00
committed by GitHub
parent 399c998fd7
commit 75aa5d9b2d
7 changed files with 42 additions and 147 deletions
+11 -31
View File
@@ -254,27 +254,8 @@ jobs:
path: /tmp/**/*.log
retention-days: 5
docker-build-postgres-container:
runs-on: blacksmith-4vcpu-ubuntu-2404
name: Docker build postgres container
steps:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ inputs.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Setup Docker Builder
uses: useblacksmith/setup-docker-builder@v1
- name: Build and push
uses: useblacksmith/build-push-action@v2
with:
push: true
tags: speckle/speckle-postgres:${{ inputs.IMAGE_VERSION_TAG }}
file: ./utils/postgres/Dockerfile
test-server:
name: Server
needs: [docker-build-postgres-container]
runs-on: blacksmith-8vcpu-ubuntu-2404
continue-on-error: ${{ inputs.CONTINUE_ON_ERROR }}
services:
@@ -288,11 +269,12 @@ jobs:
ports:
- 6379:6379
postgres:
image: speckle/speckle-postgres:${{ inputs.IMAGE_VERSION_TAG }}
image: postgres:16.4-alpine3.20
env:
POSTGRES_DB: speckle2_test
POSTGRES_PASSWORD: speckle
POSTGRES_USER: speckle
POSTGRES_INITDB_ARGS: -c max_prepared_transactions=150
ports:
- 5432:5432
options: >-
@@ -369,7 +351,6 @@ jobs:
test-server-no-ff:
name: Server no ff
needs: [docker-build-postgres-container]
runs-on: blacksmith-8vcpu-ubuntu-2404
continue-on-error: ${{ inputs.CONTINUE_ON_ERROR }}
services:
@@ -383,11 +364,12 @@ jobs:
ports:
- 6379:6379
postgres:
image: speckle/speckle-postgres:${{ inputs.IMAGE_VERSION_TAG }}
image: postgres:16.4-alpine3.20
env:
POSTGRES_DB: speckle2_test
POSTGRES_PASSWORD: speckle
POSTGRES_USER: speckle
POSTGRES_INITDB_ARGS: -c max_prepared_transactions=150
ports:
- 5432:5432
options: >-
@@ -454,9 +436,7 @@ jobs:
test-server-multiregion:
name: Server multiregion
needs: [docker-build-postgres-container]
continue-on-error: ${{ inputs.CONTINUE_ON_ERROR }}
if: false # disabled
runs-on: blacksmith-4vcpu-ubuntu-2404
services:
redis:
@@ -470,11 +450,12 @@ jobs:
- 6379:6379
postgres0:
image: speckle/speckle-postgres:${{ inputs.IMAGE_VERSION_TAG }}
image: postgres:16.4-alpine3.20
env:
POSTGRES_DB: speckle2_test
POSTGRES_PASSWORD: speckle
POSTGRES_USER: speckle
POSTGRES_INITDB_ARGS: -c max_prepared_transactions=150
ports:
- 5432:5432
options: >-
@@ -482,13 +463,13 @@ jobs:
--health-interval 10s
--health-timeout 5s
--health-retries 5
postgres1:
image: speckle/speckle-postgres:${{ inputs.IMAGE_VERSION_TAG }}
image: postgres:16.4-alpine3.20
env:
POSTGRES_DB: speckle2_test
POSTGRES_PASSWORD: speckle
POSTGRES_USER: speckle
POSTGRES_INITDB_ARGS: -c max_prepared_transactions=150
ports:
- 5433:5432
options: >-
@@ -496,13 +477,13 @@ jobs:
--health-interval 10s
--health-timeout 5s
--health-retries 5
postgres2:
image: speckle/speckle-postgres:${{ inputs.IMAGE_VERSION_TAG }}
image: postgres:16.4-alpine3.20
env:
POSTGRES_DB: speckle2_test
POSTGRES_PASSWORD: speckle
POSTGRES_USER: speckle
POSTGRES_INITDB_ARGS: -c max_prepared_transactions=150
ports:
- 5434:5432
options: >-
@@ -510,7 +491,6 @@ jobs:
--health-interval 10s
--health-timeout 5s
--health-retries 5
minio0:
image: bitnami/minio
env:
@@ -583,7 +563,7 @@ jobs:
- run: cp .env.test-example .env.test
working-directory: 'packages/server'
- name: 'Run test'
run: yarn test:report
run: yarn test:multiregion
working-directory: 'packages/server'
timeout-minutes: 30
- uses: codecov/codecov-action@v5