From 177e7f25e4401ec6ab18926286b3aff26cac8d00 Mon Sep 17 00:00:00 2001 From: "Leslie H." <142967379+SleepyLeslie@users.noreply.github.com> Date: Mon, 9 Dec 2024 16:22:06 -0600 Subject: [PATCH] Split gen-server tests with sqlite/postgres --- .github/workflows/main.yml | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e8d8a02e86..b5a82dbf9f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,8 +23,7 @@ jobs: - ':lint:python:client:common:smoke:stubs:' - ':server-1-of-2:' - ':server-2-of-2:' - - ':gen-server-1-of-2:' - - ':gen-server-2-of-2:' + - ':gen-server:' - ':nbrowser-^[A-D]:' - ':nbrowser-^[E-L]:' - ':nbrowser-^[M-N]:' @@ -98,14 +97,12 @@ jobs: if: contains(matrix.tests, ':stubs:') run: MOCHA_WEBDRIVER_HEADLESS=1 yarn run test:stubs - - name: Run gen-server tests with minio and redis + - name: Run gen-server tests with sqlite, minio and redis if: contains(matrix.tests, ':gen-server-') run: | - PGPASSWORD=db_password psql -h localhost -U db_user -w db_name -c "SHOW ALL;" | grep ' jit ' export TEST_SPLITS=$(echo $TESTS | sed "s/.*:gen-server-\([^:]*\).*/\1/") yarn run test:gen-server - TYPEORM_TYPE=postgres TYPEORM_HOST=localhost TYPEORM_DATABASE=db_name TYPEORM_USERNAME=db_user TYPEORM_PASSWORD=db_password yarn run test:gen-server - env: + env: &server-test-env MOCHA_WEBDRIVER_HEADLESS: 1 TESTS: ${{ matrix.tests }} GRIST_DOCS_MINIO_ACCESS_KEY: administrator @@ -116,21 +113,25 @@ jobs: GRIST_DOCS_MINIO_PORT: 9000 GRIST_DOCS_MINIO_BUCKET: grist-docs-test + - name: Run gen-server tests with postgres, minio and redis + if: contains(matrix.tests, ':gen-server-') + run: | + PGPASSWORD=$TYPEORM_PASSWORD psql -h $TYPEORM_HOST -U $TYPEORM_USERNAME -w $TYPEORM_DATABASE -c "SHOW ALL;" | grep ' jit ' + yarn run test:gen-server + env: + <<: *server-test-env + TYPEORM_TYPE: postgres + TYPEORM_HOST: localhost + TYPEORM_DATABASE: db_name + TYPEORM_USERNAME: db_user + TYPEORM_PASSWORD: db_password + - name: Run server tests with minio and redis if: contains(matrix.tests, ':server-') run: | export TEST_SPLITS=$(echo $TESTS | sed "s/.*:server-\([^:]*\).*/\1/") yarn run test:server - env: - MOCHA_WEBDRIVER_HEADLESS: 1 - TESTS: ${{ matrix.tests }} - GRIST_DOCS_MINIO_ACCESS_KEY: administrator - GRIST_DOCS_MINIO_SECRET_KEY: administrator - TEST_REDIS_URL: "redis://localhost/11" - GRIST_DOCS_MINIO_USE_SSL: 0 - GRIST_DOCS_MINIO_ENDPOINT: localhost - GRIST_DOCS_MINIO_PORT: 9000 - GRIST_DOCS_MINIO_BUCKET: grist-docs-test + env: *server-test-env - name: Run main tests without minio and redis if: contains(matrix.tests, ':nbrowser-')