mirror of
https://github.com/nocodb/nocodb.git
synced 2026-04-25 07:06:41 +00:00
feat(nocohub): Removed multi worker playwright and enabled unit test
This commit is contained in:
81
.github/workflows/ci-cd.yml
vendored
81
.github/workflows/ci-cd.yml
vendored
@@ -25,47 +25,48 @@ concurrency:
|
|||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# unit-tests-pg:
|
unit-tests-pg:
|
||||||
# runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
# timeout-minutes: 40
|
timeout-minutes: 40
|
||||||
# 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 }}
|
||||||
# steps:
|
steps:
|
||||||
# - name: Setup Node
|
- name: Setup Node
|
||||||
# uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
# with:
|
with:
|
||||||
# node-version: 16.15.0
|
node-version: 16.15.0
|
||||||
# - name: Checkout
|
- name: Checkout
|
||||||
# uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
# with:
|
with:
|
||||||
# fetch-depth: 0
|
fetch-depth: 0
|
||||||
# - name: Cache node modules
|
- name: Set CI env
|
||||||
# uses: actions/cache@v3
|
run: export CI=true
|
||||||
# env:
|
- name: Set Node env
|
||||||
# cache-name: cache-node-modules
|
run: export NODE_OPTIONS=\"--max_old_space_size=16384\";
|
||||||
|
- name: Cache node modules
|
||||||
|
uses: actions/cache@v3
|
||||||
|
env:
|
||||||
|
cache-name: cache-node-modules
|
||||||
|
|
||||||
# with:
|
with:
|
||||||
# # npm cache files are stored in `~/.npm` on Linux/macOS
|
# npm cache files are stored in `~/.npm` on Linux/macOS
|
||||||
# path: ~/.npm
|
path: ~/.npm
|
||||||
# key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
||||||
# restore-keys: |
|
restore-keys: |
|
||||||
# ${{ runner.os }}-build-${{ env.cache-name }}-
|
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||||
# ${{ runner.os }}-build-
|
${{ runner.os }}-build-
|
||||||
# ${{ runner.os }}-
|
${{ runner.os }}-
|
||||||
# - name: setup pg
|
- name: install dependencies nocodb-sdk
|
||||||
# working-directory: ./
|
working-directory: ./packages/nocodb-sdk
|
||||||
# run: docker-compose -f ./tests/playwright/scripts/docker-compose-playwright-pg.yml up -d &
|
run: npm install
|
||||||
# - name: install dependencies nocodb-sdk
|
- name: build nocodb-sdk
|
||||||
# working-directory: ./packages/nocodb-sdk
|
working-directory: ./packages/nocodb-sdk
|
||||||
# run: npm install
|
run: npm run build:main
|
||||||
# - name: build nocodb-sdk
|
- name: Install dependencies
|
||||||
# working-directory: ./packages/nocodb-sdk
|
working-directory: ./packages/nocodb
|
||||||
# run: npm run build:main
|
run: npm install
|
||||||
# - name: Install dependencies
|
- name: run unit tests
|
||||||
# working-directory: ./packages/nocodb
|
working-directory: ./packages/nocodb
|
||||||
# run: npm install
|
run: npm run test:unit:pg
|
||||||
# - name: run unit tests
|
|
||||||
# working-directory: ./packages/nocodb
|
|
||||||
# run: npm run test:unit:pg
|
|
||||||
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
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ sudo apt-get -y update
|
|||||||
sudo apt-get -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
sudo apt-get -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
||||||
|
|
||||||
#swap
|
#swap
|
||||||
sudo fallocate -l 1G /swapfile
|
sudo fallocate -l 8G /swapfile
|
||||||
sudo chmod 600 /swapfile
|
sudo chmod 600 /swapfile
|
||||||
sudo mkswap /swapfile
|
sudo mkswap /swapfile
|
||||||
sudo swapon /swapfile
|
sudo swapon /swapfile
|
||||||
|
|||||||
@@ -15,8 +15,8 @@
|
|||||||
"test:debug:watch": "npx nodemon -e ts -w ./ -x \"npm run test:debug\"",
|
"test:debug:watch": "npx nodemon -e ts -w ./ -x \"npm run test:debug\"",
|
||||||
"test:debug:quick:sqlite": "./startPlayWrightServer.sh; PW_QUICK_TEST=1 PW_TEST_REUSE_CONTEXT=1 PW_TEST_CONNECT_WS_ENDPOINT=ws://127.0.0.1:31000/ PWDEBUG=console npx playwright test -c playwright.config.ts --headed --project=chromium --retries 0 --timeout 5 --workers 1 --max-failures=1",
|
"test:debug:quick:sqlite": "./startPlayWrightServer.sh; PW_QUICK_TEST=1 PW_TEST_REUSE_CONTEXT=1 PW_TEST_CONNECT_WS_ENDPOINT=ws://127.0.0.1:31000/ PWDEBUG=console npx playwright test -c playwright.config.ts --headed --project=chromium --retries 0 --timeout 5 --workers 1 --max-failures=1",
|
||||||
"ci:test": "npx playwright test --workers=2",
|
"ci:test": "npx playwright test --workers=2",
|
||||||
"ci:test:shard:1": "npx playwright test --workers=2 --shard=1/2",
|
"ci:test:shard:1": "npx playwright test --shard=1/2",
|
||||||
"ci:test:shard:2": "npx playwright test --workers=2 --shard=2/2",
|
"ci:test:shard:2": "npx playwright test --shard=2/2",
|
||||||
"ci:test:mysql": "E2E_DB_TYPE=mysql npx playwright test --workers=2",
|
"ci:test:mysql": "E2E_DB_TYPE=mysql npx playwright test --workers=2",
|
||||||
"ci:test:pg": "E2E_DB_TYPE=pg npx playwright test --workers=2"
|
"ci:test:pg": "E2E_DB_TYPE=pg npx playwright test --workers=2"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user