mirror of
https://gitee.com/nocobase/nocobase.git
synced 2024-12-02 04:07:50 +08:00
chore: improve ci (#976)
* test: ci * fix: ci error * fix: on pull_request * fix: paths * fix: paths 'packages/**' # Conflicts: # .github/workflows/nocobase-test.yml
This commit is contained in:
parent
f477d80de4
commit
274d80d501
@ -1,9 +1,11 @@
|
||||
name: push-acr
|
||||
name: Aliyun Container Registry
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
paths:
|
||||
- 'packages/**'
|
||||
|
||||
jobs:
|
||||
push-acr:
|
@ -1,9 +1,11 @@
|
||||
name: main-docker
|
||||
name: Docker Hub
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
paths:
|
||||
- 'packages/**'
|
||||
|
||||
jobs:
|
||||
push-docker:
|
||||
@ -51,6 +53,6 @@ jobs:
|
||||
file: Dockerfile
|
||||
build-args: |
|
||||
VERDACCIO_URL=http://localhost:4873/
|
||||
platforms: linux/amd64,linux/arm64
|
||||
# platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
@ -1,21 +1,45 @@
|
||||
name: Nocobase test
|
||||
name: NocoBase Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- develop
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
paths:
|
||||
- 'packages/**'
|
||||
# paths-ignore:
|
||||
# - 'docs/**'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
paths:
|
||||
- 'packages/**'
|
||||
# paths-ignore:
|
||||
# - 'docs/**'
|
||||
|
||||
jobs:
|
||||
test:
|
||||
sqlite-test:
|
||||
strategy:
|
||||
matrix:
|
||||
node_version: ['14']
|
||||
node_version: ['16']
|
||||
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
|
||||
- name: Test with Sqlite
|
||||
run: yarn test
|
||||
env:
|
||||
DB_DIALECT: sqlite
|
||||
DB_STORAGE: /tmp/db.sqlite
|
||||
|
||||
postgres-test:
|
||||
strategy:
|
||||
matrix:
|
||||
node_version: ['16']
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
container: node:${{ matrix.node_version }}
|
||||
@ -34,13 +58,6 @@ jobs:
|
||||
--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 }}
|
||||
@ -49,7 +66,6 @@ jobs:
|
||||
node-version: ${{ matrix.node_version }}
|
||||
cache: 'yarn'
|
||||
- run: yarn install
|
||||
# - run: yarn build
|
||||
- name: Test with postgres
|
||||
run: yarn test
|
||||
env:
|
||||
@ -59,11 +75,28 @@ jobs:
|
||||
DB_USER: nocobase
|
||||
DB_PASSWORD: password
|
||||
DB_DATABASE: nocobase
|
||||
- name: Test with Sqlite
|
||||
run: yarn test
|
||||
|
||||
mysql-test:
|
||||
strategy:
|
||||
matrix:
|
||||
node_version: ['16']
|
||||
runs-on: ubuntu-latest
|
||||
container: node:${{ matrix.node_version }}
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:8
|
||||
env:
|
||||
DB_DIALECT: sqlite
|
||||
DB_STORAGE: /tmp/db.sqlite
|
||||
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
|
||||
- name: Test with MySQL
|
||||
run: yarn test
|
||||
env:
|
@ -1,4 +1,4 @@
|
||||
name: release-ci
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
Loading…
Reference in New Issue
Block a user