mirror of
https://github.com/nocodb/nocodb.git
synced 2026-02-02 02:47:29 +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
|
||||
|
||||
jobs:
|
||||
# unit-tests-pg:
|
||||
# runs-on: self-hosted
|
||||
# timeout-minutes: 40
|
||||
# if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }}
|
||||
# steps:
|
||||
# - name: Setup Node
|
||||
# uses: actions/setup-node@v3
|
||||
# with:
|
||||
# node-version: 16.15.0
|
||||
# - name: Checkout
|
||||
# uses: actions/checkout@v3
|
||||
# with:
|
||||
# fetch-depth: 0
|
||||
# - name: Cache node modules
|
||||
# uses: actions/cache@v3
|
||||
# env:
|
||||
# cache-name: cache-node-modules
|
||||
unit-tests-pg:
|
||||
runs-on: self-hosted
|
||||
timeout-minutes: 40
|
||||
if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }}
|
||||
steps:
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.15.0
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Set CI env
|
||||
run: export CI=true
|
||||
- name: Set Node env
|
||||
run: export NODE_OPTIONS=\"--max_old_space_size=16384\";
|
||||
- name: Cache node modules
|
||||
uses: actions/cache@v3
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
|
||||
# with:
|
||||
# # npm cache files are stored in `~/.npm` on Linux/macOS
|
||||
# path: ~/.npm
|
||||
# key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
||||
# restore-keys: |
|
||||
# ${{ runner.os }}-build-${{ env.cache-name }}-
|
||||
# ${{ runner.os }}-build-
|
||||
# ${{ runner.os }}-
|
||||
# - name: setup pg
|
||||
# working-directory: ./
|
||||
# run: docker-compose -f ./tests/playwright/scripts/docker-compose-playwright-pg.yml up -d &
|
||||
# - name: install dependencies nocodb-sdk
|
||||
# working-directory: ./packages/nocodb-sdk
|
||||
# run: npm install
|
||||
# - name: build nocodb-sdk
|
||||
# working-directory: ./packages/nocodb-sdk
|
||||
# run: npm run build:main
|
||||
# - name: Install dependencies
|
||||
# working-directory: ./packages/nocodb
|
||||
# run: npm install
|
||||
# - name: run unit tests
|
||||
# working-directory: ./packages/nocodb
|
||||
# run: npm run test:unit:pg
|
||||
with:
|
||||
# npm cache files are stored in `~/.npm` on Linux/macOS
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||
${{ runner.os }}-build-
|
||||
${{ runner.os }}-
|
||||
- name: install dependencies nocodb-sdk
|
||||
working-directory: ./packages/nocodb-sdk
|
||||
run: npm install
|
||||
- name: build nocodb-sdk
|
||||
working-directory: ./packages/nocodb-sdk
|
||||
run: npm run build:main
|
||||
- name: Install dependencies
|
||||
working-directory: ./packages/nocodb
|
||||
run: npm install
|
||||
- name: run unit tests
|
||||
working-directory: ./packages/nocodb
|
||||
run: npm run test:unit:pg
|
||||
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
|
||||
|
||||
@@ -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
|
||||
|
||||
#swap
|
||||
sudo fallocate -l 1G /swapfile
|
||||
sudo fallocate -l 8G /swapfile
|
||||
sudo chmod 600 /swapfile
|
||||
sudo mkswap /swapfile
|
||||
sudo swapon /swapfile
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
"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",
|
||||
"ci:test": "npx playwright test --workers=2",
|
||||
"ci:test:shard:1": "npx playwright test --workers=2 --shard=1/2",
|
||||
"ci:test:shard:2": "npx playwright test --workers=2 --shard=2/2",
|
||||
"ci:test:shard:1": "npx playwright test --shard=1/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:pg": "E2E_DB_TYPE=pg npx playwright test --workers=2"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user