多维表格
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

90 lines
3.6 KiB

# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
# Trigger configuration : https://gist.github.com/myobie/671d2f2a1e503efa0c05e7b865c26a9d
name: "CI/CD"
on:
push:
branches: [develop]
paths:
- "packages/nc-gui/**"
- "scripts/cypress/**"
- "packages/nocodb/**"
- ".github/workflows/ci-cd.yml"
pull_request:
types: [opened, reopened, synchronize, ready_for_review, labeled]
branches: [develop]
paths:
- "packages/nc-gui/**"
- "scripts/cypress/**"
- "packages/nocodb/**"
- ".github/workflows/ci-cd.yml"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
# unit-tests:
# runs-on: ubuntu-20.04
# timeout-minutes: 30
# 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
# 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: setup mysql
# working-directory: ./
# run: docker-compose -f ./scripts/cypress/docker-compose-cypress.yml up -d
# - 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-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
with:
db: pg
shard: 1
playwright-pg-shard-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: pg
shard: 2