mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-26 12:18:21 +00:00
chore: added codecov with ci git action
This commit is contained in:
parent
d1c9838343
commit
eb73686c24
116
.github/workflows/ci.yml
vendored
Normal file
116
.github/workflows/ci.yml
vendored
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
name: Node CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
upload-designer-codecov:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
# if: ${{ github.event.pull_request.head.repo.full_name == 'alibaba/lowcode-engine' }}
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: '14'
|
||||||
|
|
||||||
|
- name: install
|
||||||
|
run: npm i && npm run setup:skip-build
|
||||||
|
|
||||||
|
- name: test designer
|
||||||
|
run: cd packages/designer && npm run test:cov && cd ../..
|
||||||
|
|
||||||
|
- name: Upload designer coverage to Codecov
|
||||||
|
uses: codecov/codecov-action@v3
|
||||||
|
with:
|
||||||
|
# working-directory: packages/designer
|
||||||
|
directory: ./packages/designer/coverage
|
||||||
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
name: designer
|
||||||
|
fail_ci_if_error: true
|
||||||
|
verbose: true
|
||||||
|
|
||||||
|
upload-renderer-core:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: '14'
|
||||||
|
|
||||||
|
- name: install
|
||||||
|
run: npm i && npm run setup:skip-build
|
||||||
|
|
||||||
|
- name: test renderer-core
|
||||||
|
run: cd packages/renderer-core && npm run test:cov && cd ../..
|
||||||
|
|
||||||
|
- name: Upload renderer-core coverage to Codecov
|
||||||
|
uses: codecov/codecov-action@v3
|
||||||
|
with:
|
||||||
|
# working-directory: packages/designer
|
||||||
|
directory: ./packages/renderer-core/coverage
|
||||||
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
name: renderer-core
|
||||||
|
fail_ci_if_error: true
|
||||||
|
verbose: true
|
||||||
|
|
||||||
|
upload-react-simulator-renderer:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: '14'
|
||||||
|
|
||||||
|
- name: install
|
||||||
|
run: npm i && npm run setup:skip-build
|
||||||
|
|
||||||
|
- name: test react-simulator-renderer
|
||||||
|
run: cd packages/react-simulator-renderer && npm run test:cov && cd ../..
|
||||||
|
|
||||||
|
- name: Upload react-simulator-renderer coverage to Codecov
|
||||||
|
uses: codecov/codecov-action@v3
|
||||||
|
with:
|
||||||
|
# working-directory: packages/designer
|
||||||
|
directory: ./packages/react-simulator-renderer/coverage
|
||||||
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
name: react-simulator-renderer
|
||||||
|
fail_ci_if_error: true
|
||||||
|
verbose: true
|
||||||
|
|
||||||
|
upload-code-generator:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
# if: ${{ github.event.pull_request.head.repo.full_name == 'alibaba/lowcode-engine' }}
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: '14'
|
||||||
|
|
||||||
|
- name: install
|
||||||
|
run: npm i && npm run setup:skip-build
|
||||||
|
|
||||||
|
- name: test code-generator
|
||||||
|
run: cd modules/code-generator && npm i && npm run build && npm run test:cov && cd ../..
|
||||||
|
|
||||||
|
- name: Upload code-generator coverage to Codecov
|
||||||
|
uses: codecov/codecov-action@v3
|
||||||
|
with:
|
||||||
|
# working-directory: packages/designer
|
||||||
|
directory: ./modules/code-generator/coverage
|
||||||
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
name: code-generator
|
||||||
|
fail_ci_if_error: true
|
||||||
|
verbose: true
|
||||||
@ -123,7 +123,7 @@ export class SchemaParser implements ISchemaParser {
|
|||||||
const schema = this.decodeSchema(schemaSrc);
|
const schema = this.decodeSchema(schemaSrc);
|
||||||
|
|
||||||
// 解析三方组件依赖
|
// 解析三方组件依赖
|
||||||
schema.componentsMap.forEach((info) => {
|
schema.componentsMap.forEach((info: any) => {
|
||||||
if (info.componentName) {
|
if (info.componentName) {
|
||||||
compDeps[info.componentName] = {
|
compDeps[info.componentName] = {
|
||||||
...info,
|
...info,
|
||||||
|
|||||||
@ -181,7 +181,7 @@ export function parseExpressionGetKeywords(expr: string | null | undefined): str
|
|||||||
const fieldValue = node[fieldName as keyof typeof node];
|
const fieldValue = node[fieldName as keyof typeof node];
|
||||||
if (typeof fieldValue === 'object') {
|
if (typeof fieldValue === 'object') {
|
||||||
if (Array.isArray(fieldValue)) {
|
if (Array.isArray(fieldValue)) {
|
||||||
fieldValue.forEach((item) => {
|
fieldValue.forEach((item: any) => {
|
||||||
addIdentifierIfNeeded(item);
|
addIdentifierIfNeeded(item);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@ -233,7 +233,7 @@ export function parseExpressionGetGlobalVariables(
|
|||||||
const fieldValue = node[fieldName as keyof typeof node];
|
const fieldValue = node[fieldName as keyof typeof node];
|
||||||
if (typeof fieldValue === 'object') {
|
if (typeof fieldValue === 'object') {
|
||||||
if (Array.isArray(fieldValue)) {
|
if (Array.isArray(fieldValue)) {
|
||||||
fieldValue.forEach((item) => {
|
fieldValue.forEach((item: any) => {
|
||||||
addUndeclaredIdentifierIfNeeded(item, path);
|
addUndeclaredIdentifierIfNeeded(item, path);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -12,7 +12,9 @@
|
|||||||
|
|
||||||
[![NPM version][npm-image]][npm-url] [![NPM downloads][download-image]][download-url]
|
[![NPM version][npm-image]][npm-url] [![NPM downloads][download-image]][download-url]
|
||||||
|
|
||||||
[![][issues-helper-image]][issues-helper-url] [![Issues need help][help-wanted-image]][help-wanted-url]
|
[![][issues-helper-image]][issues-helper-url] [![Issues need help][help-wanted-image]][help-wanted-url]
|
||||||
|
|
||||||
|
[![codecov][codecov-image-url]][codecov-url]
|
||||||
|
|
||||||
[npm-image]: https://img.shields.io/npm/v/@alilc/lowcode-engine.svg?style=flat-square
|
[npm-image]: https://img.shields.io/npm/v/@alilc/lowcode-engine.svg?style=flat-square
|
||||||
[npm-url]: http://npmjs.org/package/@alilc/lowcode-engine
|
[npm-url]: http://npmjs.org/package/@alilc/lowcode-engine
|
||||||
@ -25,6 +27,9 @@
|
|||||||
[issues-helper-image]: https://img.shields.io/badge/using-issues--helper-orange?style=flat-square
|
[issues-helper-image]: https://img.shields.io/badge/using-issues--helper-orange?style=flat-square
|
||||||
[issues-helper-url]: https://github.com/actions-cool/issues-helper
|
[issues-helper-url]: https://github.com/actions-cool/issues-helper
|
||||||
|
|
||||||
|
[codecov-image-url]: https://codecov.io/gh/alibaba/lowcode-engine/branch/main/graph/badge.svg
|
||||||
|
[codecov-url]: https://codecov.io/gh/alibaba/lowcode-engine
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
[](https://lowcode-engine.cn)
|
[](https://lowcode-engine.cn)
|
||||||
|
|||||||
@ -14,6 +14,8 @@ An enterprise-class low-code technology stack with scale-out design
|
|||||||
|
|
||||||
[![][issues-helper-image]][issues-helper-url] [![Issues need help][help-wanted-image]][help-wanted-url]
|
[![][issues-helper-image]][issues-helper-url] [![Issues need help][help-wanted-image]][help-wanted-url]
|
||||||
|
|
||||||
|
[![codecov][codecov-image-url]][codecov-url]
|
||||||
|
|
||||||
[npm-image]: https://img.shields.io/npm/v/@alilc/lowcode-engine.svg?style=flat-square
|
[npm-image]: https://img.shields.io/npm/v/@alilc/lowcode-engine.svg?style=flat-square
|
||||||
[npm-url]: http://npmjs.org/package/@alilc/lowcode-engine
|
[npm-url]: http://npmjs.org/package/@alilc/lowcode-engine
|
||||||
|
|
||||||
@ -25,6 +27,9 @@ An enterprise-class low-code technology stack with scale-out design
|
|||||||
[issues-helper-image]: https://img.shields.io/badge/using-issues--helper-orange?style=flat-square
|
[issues-helper-image]: https://img.shields.io/badge/using-issues--helper-orange?style=flat-square
|
||||||
[issues-helper-url]: https://github.com/actions-cool/issues-helper
|
[issues-helper-url]: https://github.com/actions-cool/issues-helper
|
||||||
|
|
||||||
|
[codecov-image-url]: https://codecov.io/gh/alibaba/lowcode-engine/branch/main/graph/badge.svg
|
||||||
|
[codecov-url]: https://codecov.io/gh/alibaba/lowcode-engine
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
[](http://lowcode-engine.cn)
|
[](http://lowcode-engine.cn)
|
||||||
|
|||||||
@ -13,7 +13,8 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "build-scripts test --config build.test.json",
|
"test": "build-scripts test --config build.test.json",
|
||||||
"build": "NODE_OPTIONS=--max_old_space_size=8192 build-scripts build --skip-demo",
|
"build": "NODE_OPTIONS=--max_old_space_size=8192 build-scripts build --skip-demo",
|
||||||
"build:umd": "NODE_OPTIONS=--max_old_space_size=8192 build-scripts build --config build.umd.json"
|
"build:umd": "NODE_OPTIONS=--max_old_space_size=8192 build-scripts build --config build.umd.json",
|
||||||
|
"test:cov": "build-scripts test --config build.test.json --jest-coverage"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@alilc/lowcode-designer": "1.0.14",
|
"@alilc/lowcode-designer": "1.0.14",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user