diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 9e0ef8acaf..fec74fbc38 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -66,16 +66,30 @@ jobs: # - name: run unit tests # working-directory: ./packages/nocodb # run: npm run test:unit - # playwright-mysql: - # if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} - # uses: ./.github/workflows/playwright-test-workflow.yml - # with: - # db: mysql - # playwright-sqlite: - # if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} - # uses: ./.github/workflows/playwright-test-workflow.yml - # with: - # db: sqlite + playwright-mysql-1: + if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} + uses: ./.github/workflows/playwright-test-workflow.yml + with: + db: mysql + shard: 1 + playwright-mysql-2: + if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} + uses: ./.github/workflows/playwright-test-workflow.yml + with: + db: mysql + shard: 2 + playwright-sqlite-1: + if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} + uses: ./.github/workflows/playwright-test-workflow.yml + with: + db: sqlite + shard: 1 + playwright-sqlite-2: + if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} + uses: ./.github/workflows/playwright-test-workflow.yml + with: + db: sqlite + shard: 2 playwright-pg-shard-1: if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} uses: ./.github/workflows/playwright-test-workflow.yml diff --git a/packages/nc-gui/tests/playwright/scripts/docker-compose-pg-pw-quick.yml b/packages/nc-gui/tests/playwright/scripts/docker-compose-pg-pw-quick.yml index 19dfab2887..d3c0503724 100644 --- a/packages/nc-gui/tests/playwright/scripts/docker-compose-pg-pw-quick.yml +++ b/packages/nc-gui/tests/playwright/scripts/docker-compose-pg-pw-quick.yml @@ -9,7 +9,7 @@ services: ports: - 5432:5432 volumes: - - ../../../packages/nocodb/tests/pg-cy-quick:/docker-entrypoint-initdb.d + - ../../../../packages/nocodb/tests/pg-cy-quick:/docker-entrypoint-initdb.d healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 10s diff --git a/packages/nc-gui/tests/playwright/scripts/docker-compose-playwright.yml b/packages/nc-gui/tests/playwright/scripts/docker-compose-playwright.yml index 4c7638e689..bed648a8b2 100644 --- a/packages/nc-gui/tests/playwright/scripts/docker-compose-playwright.yml +++ b/packages/nc-gui/tests/playwright/scripts/docker-compose-playwright.yml @@ -11,4 +11,4 @@ services: environment: MYSQL_ROOT_PASSWORD: password volumes: - - ../../../packages/nocodb/tests/mysql-sakila-db:/docker-entrypoint-initdb.d \ No newline at end of file + - ../../../../packages/nocodb/tests/mysql-sakila-db:/docker-entrypoint-initdb.d \ No newline at end of file diff --git a/packages/nocodb/package.json b/packages/nocodb/package.json index 74970c47cf..07535cceaf 100644 --- a/packages/nocodb/package.json +++ b/packages/nocodb/package.json @@ -36,9 +36,9 @@ "docker:build": "EE=\"true-xc-test\" webpack --config docker/webpack.config.js", "watch:build": "nodemon -e ts,js -w ./src -x npm run build", "watch:run": "cross-env NC_DISABLE_TELE1=true EE=true nodemon -e ts,js -w ./src -x \"ts-node src/run/docker --log-error --project tsconfig.json\"", - "watch:run:playwright": "cross-env DATABASE_URL=sqlite:./test_noco.db PLAYWRIGHT_TEST=true NC_DISABLE_TELE=true EE=true nodemon -e ts,js -w ./src -x \"ts-node src/run/testDocker --log-error --project tsconfig.json\"", + "watch:run:playwright": "rm -f ./test_noco.db; cross-env DATABASE_URL=sqlite:./test_noco.db PLAYWRIGHT_TEST=true NC_DISABLE_TELE=true EE=true nodemon -e ts,js -w ./src -x \"ts-node src/run/testDocker --log-error --project tsconfig.json\"", "watch:run:playwright:quick": "rm -f ./test_noco.db; cp ../../scripts/cypress/fixtures/quickTest/noco_0_91_7.db ./test_noco.db; cross-env DATABASE_URL=sqlite:./test_noco.db NC_DISABLE_TELE=true EE=true nodemon -e ts,js -w ./src -x \"ts-node src/run/docker --log-error --project tsconfig.json\"", - "watch:run:playwright:pg:cyquick": "cross-env EE=true nodemon -e ts,js -w ./src -x \"ts-node src/run/dockerRunPG_CyQuick.ts --log-error --project tsconfig.json\"", + "watch:run:playwright:pg:cyquick": "rm -f ./test_noco.db; cp ../../scripts/cypress/fixtures/quickTest/noco_0_91_7.db ./test_noco.db; cross-env EE=true nodemon -e ts,js -w ./src -x \"ts-node src/run/dockerRunPG_CyQuick.ts --log-error --project tsconfig.json\"", "watch:run:cypress": "cross-env EE=true nodemon -e ts,js -w ./src -x \"ts-node src/run/docker --log-error --project tsconfig.json\"", "watch:run:cypress:pg": "cross-env EE=true nodemon -e ts,js -w ./src -x \"ts-node src/run/dockerRunPG --log-error --project tsconfig.json\"", "watch:run:cypress:pg:cyquick": "cross-env EE=true nodemon -e ts,js -w ./src -x \"ts-node src/run/dockerRunPG_CyQuick.ts --log-error --project tsconfig.json\"", diff --git a/packages/nocodb/src/lib/services/test/TestResetService/resetPgSakilaProject.ts b/packages/nocodb/src/lib/services/test/TestResetService/resetPgSakilaProject.ts index b331ecdb7f..9a7b235679 100644 --- a/packages/nocodb/src/lib/services/test/TestResetService/resetPgSakilaProject.ts +++ b/packages/nocodb/src/lib/services/test/TestResetService/resetPgSakilaProject.ts @@ -19,7 +19,7 @@ const config = { multipleStatements: true, }, searchPath: ['public', 'information_schema'], - pool: { min: 0, max: 1 }, + pool: { min: 0, max: 5 }, }; const extMysqlProject = (title, parallelId) => ({