Browse Source

fix(test): Added all the tests back to CI, added more connection to postgres pool option and fixed issues with playwright folder change

pull/4278/head
Muhammed Mustafa 2 years ago
parent
commit
7af3526594
  1. 34
      .github/workflows/ci-cd.yml
  2. 2
      packages/nc-gui/tests/playwright/scripts/docker-compose-pg-pw-quick.yml
  3. 2
      packages/nc-gui/tests/playwright/scripts/docker-compose-playwright.yml
  4. 4
      packages/nocodb/package.json
  5. 2
      packages/nocodb/src/lib/services/test/TestResetService/resetPgSakilaProject.ts

34
.github/workflows/ci-cd.yml

@ -66,16 +66,30 @@ jobs:
# - name: run unit tests # - name: run unit tests
# working-directory: ./packages/nocodb # working-directory: ./packages/nocodb
# run: npm run test:unit # run: npm run test:unit
# playwright-mysql: playwright-mysql-1:
# if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} 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 uses: ./.github/workflows/playwright-test-workflow.yml
# with: with:
# db: mysql db: mysql
# playwright-sqlite: shard: 1
# if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} playwright-mysql-2:
# uses: ./.github/workflows/playwright-test-workflow.yml if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }}
# with: uses: ./.github/workflows/playwright-test-workflow.yml
# db: sqlite 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: playwright-pg-shard-1:
if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} 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 uses: ./.github/workflows/playwright-test-workflow.yml

2
packages/nc-gui/tests/playwright/scripts/docker-compose-pg-pw-quick.yml

@ -9,7 +9,7 @@ services:
ports: ports:
- 5432:5432 - 5432:5432
volumes: volumes:
- ../../../packages/nocodb/tests/pg-cy-quick:/docker-entrypoint-initdb.d - ../../../../packages/nocodb/tests/pg-cy-quick:/docker-entrypoint-initdb.d
healthcheck: healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"] test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s interval: 10s

2
packages/nc-gui/tests/playwright/scripts/docker-compose-playwright.yml

@ -11,4 +11,4 @@ services:
environment: environment:
MYSQL_ROOT_PASSWORD: password MYSQL_ROOT_PASSWORD: password
volumes: volumes:
- ../../../packages/nocodb/tests/mysql-sakila-db:/docker-entrypoint-initdb.d - ../../../../packages/nocodb/tests/mysql-sakila-db:/docker-entrypoint-initdb.d

4
packages/nocodb/package.json

@ -36,9 +36,9 @@
"docker:build": "EE=\"true-xc-test\" webpack --config docker/webpack.config.js", "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: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": "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: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": "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": "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\"", "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\"",

2
packages/nocodb/src/lib/services/test/TestResetService/resetPgSakilaProject.ts

@ -19,7 +19,7 @@ const config = {
multipleStatements: true, multipleStatements: true,
}, },
searchPath: ['public', 'information_schema'], searchPath: ['public', 'information_schema'],
pool: { min: 0, max: 1 }, pool: { min: 0, max: 5 },
}; };
const extMysqlProject = (title, parallelId) => ({ const extMysqlProject = (title, parallelId) => ({

Loading…
Cancel
Save