mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 14:26:36 +00:00
796e73ae5a
* refactor(doc): change to new structure * docs: add database docs * docs: add collection docs * docs: add db field examples * docs(api): fix filename and menu path * docs: add database docs * docs: add db operators doc * docs: add resourcer menu * docs: add resourcer docs * docs: fix api docs * docs: refactor api menu structure * feat: update docs (#830) * feat: updates * feat: update docs * chore: ignore docs from ci Co-authored-by: Junyi <mytharcher@users.noreply.github.com> Co-authored-by: mytharcher <mytharcher@gmail.com> * docs: add database methods docs * docs: add missed api * docs: fix api docs * feat: update development docs (#833) * feat: update development docs * feat: update docs * feat: update docs * docs: add first plugin example (#834) * feat: update docs * feat: update docs * docs: fix typo Co-authored-by: chenos <chenlinxh@gmail.com>
70 lines
1.8 KiB
YAML
70 lines
1.8 KiB
YAML
name: Nocobase test
|
|
|
|
on:
|
|
pull_request:
|
|
paths-ignore:
|
|
- 'docs/**'
|
|
|
|
jobs:
|
|
test:
|
|
strategy:
|
|
matrix:
|
|
node_version: ['14']
|
|
|
|
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
|
|
mysql:
|
|
image: mysql:8
|
|
env:
|
|
MYSQL_ROOT_PASSWORD: password
|
|
MYSQL_DATABASE: nocobase
|
|
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
|
|
|
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
|
|
- name: Test with postgres
|
|
run: yarn test
|
|
env:
|
|
DB_DIALECT: postgres
|
|
DB_HOST: postgres
|
|
DB_PORT: 5432
|
|
DB_USER: nocobase
|
|
DB_PASSWORD: password
|
|
DB_DATABASE: nocobase
|
|
- name: Test with Sqlite
|
|
run: yarn test
|
|
env:
|
|
DB_DIALECT: sqlite
|
|
DB_STORAGE: /tmp/db.sqlite
|
|
- name: Test with MySQL
|
|
run: yarn test
|
|
env:
|
|
DB_DIALECT: mysql
|
|
DB_HOST: mysql
|
|
DB_PORT: 3306
|
|
DB_USER: root
|
|
DB_PASSWORD: password
|
|
DB_DATABASE: nocobase
|