name: "NestJS Unit Test" on: push: branches: [develop] paths: - "packages/nocodb/**" - ".github/workflows/jest-unit-test.yml" pull_request: types: [opened, reopened, synchronize, ready_for_review, labeled] branches: [develop] paths: - "packages/nocodb/**" - ".github/workflows/jest-unit-test.yml" workflow_call: # Triggered manually workflow_dispatch: jobs: jest-unit-test: runs-on: ubicloud-standard-2 timeout-minutes: 20 if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft || inputs.force == true }} steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup pnpm uses: pnpm/action-setup@v5 with: version: 10 - name: Setup Node uses: actions/setup-node@v4 with: node-version: 22.12.0 cache: 'pnpm' - name: Set CI env run: export CI=true - name: Set NC Edition run: export EE=true - name: remove use-node-version line from .npmrc run: sed -i '/^use-node-version/d' .npmrc - name: install dependencies run: pnpm bootstrap - name: build nocodb-sdk working-directory: ./packages/nocodb-sdk run: | pnpm run generate:sdk pnpm run build:main - name: run unit tests working-directory: ./packages/nocodb run: pnpm run test