mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 04:15:19 +00:00
chore(github-actions): separate frontend and backend tests (#2013)
This commit is contained in:
parent
9c165db0f7
commit
f1cc991c1c
34
.github/workflows/nocobase-build-test.yml
vendored
Normal file
34
.github/workflows/nocobase-build-test.yml
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
name: Nocobase Build Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
- 'develop'
|
||||
paths:
|
||||
- '.github/workflows/nocobase-build-test.yml'
|
||||
- 'packages/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
paths:
|
||||
- '.github/workflows/nocobase-build-test.yml'
|
||||
- 'packages/**'
|
||||
|
||||
jobs:
|
||||
build-test:
|
||||
strategy:
|
||||
matrix:
|
||||
node_version: [ '18' ]
|
||||
runs-on: ubuntu-latest
|
||||
container: node:${{ matrix.node_version }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js ${{ matrix.node_version }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node_version }}
|
||||
cache: 'yarn'
|
||||
- run: yarn install
|
||||
- run: yarn build
|
||||
timeout-minutes: 15
|
@ -1,4 +1,4 @@
|
||||
name: NocoBase Test Full
|
||||
name: NocoBase Backend Test
|
||||
|
||||
on:
|
||||
push:
|
||||
@ -11,6 +11,7 @@ on:
|
||||
- 'packages/core/database/**'
|
||||
- 'packages/core/server/**'
|
||||
- 'packages/plugins/**/src/server/**'
|
||||
- '.github/workflows/nocobase-test-backend.yml'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'packages/core/acl/**'
|
||||
@ -18,30 +19,14 @@ on:
|
||||
- 'packages/core/database/**'
|
||||
- 'packages/core/server/**'
|
||||
- 'packages/plugins/**/src/server/**'
|
||||
- '.github/workflows/nocobase-test-backend.yml'
|
||||
|
||||
jobs:
|
||||
build-test:
|
||||
strategy:
|
||||
matrix:
|
||||
node_version: ['18']
|
||||
runs-on: ubuntu-latest
|
||||
container: node:${{ matrix.node_version }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js ${{ matrix.node_version }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node_version }}
|
||||
cache: 'yarn'
|
||||
- run: yarn install
|
||||
- run: yarn build
|
||||
timeout-minutes: 15
|
||||
|
||||
sqlite-test:
|
||||
strategy:
|
||||
matrix:
|
||||
node_version: ['18']
|
||||
underscored: [true, false]
|
||||
node_version: [ '18' ]
|
||||
underscored: [ true, false ]
|
||||
runs-on: ubuntu-latest
|
||||
container: node:${{ matrix.node_version }}
|
||||
steps:
|
||||
@ -53,7 +38,7 @@ jobs:
|
||||
cache: 'yarn'
|
||||
- run: yarn install
|
||||
- name: Test with Sqlite
|
||||
run: yarn nocobase install -f && yarn test && yarn test:client
|
||||
run: yarn nocobase install -f && yarn test
|
||||
env:
|
||||
DB_DIALECT: sqlite
|
||||
DB_STORAGE: /tmp/db.sqlite
|
||||
@ -63,10 +48,10 @@ jobs:
|
||||
postgres-test:
|
||||
strategy:
|
||||
matrix:
|
||||
node_version: ['18']
|
||||
underscored: [true, false]
|
||||
schema: [public, nocobase]
|
||||
collection_schema: [public, user_schema]
|
||||
node_version: [ '18' ]
|
||||
underscored: [ true, false ]
|
||||
schema: [ public, nocobase ]
|
||||
collection_schema: [ public, user_schema ]
|
||||
runs-on: ubuntu-latest
|
||||
container: node:${{ matrix.node_version }}
|
||||
services:
|
||||
@ -94,7 +79,7 @@ jobs:
|
||||
- run: yarn install
|
||||
# - run: yarn build
|
||||
- name: Test with postgres
|
||||
run: yarn nocobase install -f && yarn test && yarn test:client
|
||||
run: yarn nocobase install -f && yarn test
|
||||
env:
|
||||
DB_DIALECT: postgres
|
||||
DB_HOST: postgres
|
||||
@ -110,8 +95,8 @@ jobs:
|
||||
mysql-test:
|
||||
strategy:
|
||||
matrix:
|
||||
node_version: ['18']
|
||||
underscored: [true, false]
|
||||
node_version: [ '18' ]
|
||||
underscored: [ true, false ]
|
||||
runs-on: ubuntu-latest
|
||||
container: node:${{ matrix.node_version }}
|
||||
services:
|
||||
@ -131,7 +116,7 @@ jobs:
|
||||
- run: yarn install
|
||||
# - run: yarn build
|
||||
- name: Test with MySQL
|
||||
run: yarn nocobase install -f && yarn test && yarn test:client
|
||||
run: yarn nocobase install -f && yarn test
|
||||
env:
|
||||
DB_DIALECT: mysql
|
||||
DB_HOST: mysql
|
42
.github/workflows/nocobase-test-frontend.yml
vendored
Normal file
42
.github/workflows/nocobase-test-frontend.yml
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
name: NocoBase FrontEnd Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- develop
|
||||
paths:
|
||||
- 'packages/**'
|
||||
- '.github/workflows/nocobase-test-frontend.yml'
|
||||
- '!packages/core/acl/**'
|
||||
- '!packages/core/actions/**'
|
||||
- '!packages/core/database/**'
|
||||
- '!packages/core/server/**'
|
||||
- '!packages/plugins/**/src/server/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/nocobase-test-frontend.yml'
|
||||
- 'packages/**'
|
||||
- '!packages/core/acl/**'
|
||||
- '!packages/core/actions/**'
|
||||
- '!packages/core/database/**'
|
||||
- '!packages/core/server/**'
|
||||
- '!packages/plugins/**/src/server/**'
|
||||
|
||||
jobs:
|
||||
frontend-test:
|
||||
strategy:
|
||||
matrix:
|
||||
node_version: [ '18' ]
|
||||
runs-on: ubuntu-latest
|
||||
container: node:${{ matrix.node_version }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js ${{ matrix.node_version }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node_version }}
|
||||
cache: 'yarn'
|
||||
- run: yarn install
|
||||
- run: yarn test:client
|
||||
timeout-minutes: 15
|
83
.github/workflows/nocobase-test-lite.yml
vendored
83
.github/workflows/nocobase-test-lite.yml
vendored
@ -1,83 +0,0 @@
|
||||
name: NocoBase Test Lite
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- develop
|
||||
paths:
|
||||
- 'packages/**'
|
||||
- '!packages/core/acl/**'
|
||||
- '!packages/core/actions/**'
|
||||
- '!packages/core/database/**'
|
||||
- '!packages/core/server/**'
|
||||
- '!packages/plugins/**/src/server/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'packages/**'
|
||||
- '!packages/core/acl/**'
|
||||
- '!packages/core/actions/**'
|
||||
- '!packages/core/database/**'
|
||||
- '!packages/core/server/**'
|
||||
- '!packages/plugins/**/src/server/**'
|
||||
|
||||
jobs:
|
||||
build-test:
|
||||
strategy:
|
||||
matrix:
|
||||
node_version: ['18']
|
||||
runs-on: ubuntu-latest
|
||||
container: node:${{ matrix.node_version }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js ${{ matrix.node_version }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node_version }}
|
||||
cache: 'yarn'
|
||||
- run: yarn install
|
||||
- run: yarn build
|
||||
timeout-minutes: 15
|
||||
|
||||
postgres-test:
|
||||
strategy:
|
||||
matrix:
|
||||
node_version: ['18']
|
||||
runs-on: ubuntu-latest
|
||||
container: node:${{ matrix.node_version }}
|
||||
services:
|
||||
# Label used to access the service container
|
||||
postgres:
|
||||
# Docker Hub image
|
||||
image: postgres:10
|
||||
# Provide the password for postgres
|
||||
env:
|
||||
POSTGRES_USER: nocobase
|
||||
POSTGRES_PASSWORD: password
|
||||
# Set health checks to wait until postgres has started
|
||||
options: >-
|
||||
--health-cmd pg_isready
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js ${{ matrix.node_version }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node_version }}
|
||||
cache: 'yarn'
|
||||
- run: yarn install
|
||||
- name: Test with postgres
|
||||
run: yarn nocobase install -f && yarn test && yarn test:client
|
||||
env:
|
||||
DB_DIALECT: postgres
|
||||
DB_HOST: postgres
|
||||
DB_PORT: 5432
|
||||
DB_USER: nocobase
|
||||
DB_PASSWORD: password
|
||||
DB_DATABASE: nocobase
|
||||
DB_UNDERSCORED: true
|
||||
DB_SCHEMA: nocobase
|
||||
COLLECTION_MANAGER_SCHEMA: user_schema
|
||||
timeout-minutes: 30
|
Loading…
Reference in New Issue
Block a user