Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/GitHub action #98

Closed
wants to merge 30 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
cbac18a
docs(work): 添加eslint检查
wenmine Nov 18, 2023
dcb6aad
docs(work): 修改贡献指南
wenmine Nov 18, 2023
1fa64bb
docs(work): 添加eslint检查
wenmine Nov 18, 2023
1b5ae21
docs(work): 删除readme.en-US
wenmine Nov 18, 2023
8fe927e
docs(work): 添加eslint检查
wenmine Nov 18, 2023
8871427
docs(work): 添加eslint检查&build检查
wenmine Nov 18, 2023
6a98a1b
docs(work): 添加build检查
wenmine Nov 20, 2023
f9e7068
docs(work): 添加eslint检查
wenmine Nov 21, 2023
64b8c76
docs(work): 添加eslint检查
wenmine Nov 21, 2023
d601ea5
docs(work): 添加eslint检查
wenmine Nov 21, 2023
5075354
docs(work): 添加eslint检查
wenmine Nov 21, 2023
ac65076
docs(work): 添加eslint检查
wenmine Nov 21, 2023
038ba79
docs(work): 添加eslint检查
wenmine Nov 21, 2023
18129a2
docs(work): 添加eslint检查
wenmine Nov 21, 2023
4ca4527
docs(work): 添加eslint检查
wenmine Nov 21, 2023
1c285d1
docs(work): 添加eslint检查
wenmine Nov 21, 2023
167aeaf
docs(work): 添加eslint检查
wenmine Nov 21, 2023
09673b5
docs(work): 添加eslint检查
wenmine Nov 21, 2023
9d32929
docs(work): 添加eslint检查
wenmine Nov 21, 2023
0d4f800
test
wenmine Nov 21, 2023
e012a4b
test
wenmine Nov 21, 2023
bfdbf3e
test
wenmine Nov 21, 2023
fc3f5bb
test2
wenmine Nov 21, 2023
2e51b07
test3
wenmine Nov 21, 2023
9f7e12b
test4
wenmine Nov 21, 2023
fba13db
test4
wenmine Nov 21, 2023
69f3d8c
test2
wenmine Nov 21, 2023
13df6ac
chore(workflow): 自动添加reviewer人员
wenmine Nov 21, 2023
c32c1f0
chore(workflow): 自动添加reviewer人员
wenmine Nov 21, 2023
4f3e830
chore(workflow): 自动添加reviewer人员
wenmine Nov 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ package-lock.json
**/node_modules/**
tmp
temp
mockServer
42 changes: 42 additions & 0 deletions .github/reviewers_for_configs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Set to true to add reviewers to pull requests
addReviewers: true

# Set to true to add assignees to pull requests
addAssignees: true

# A list of reviewers to be added to pull requests (GitHub user name)
reviewers:
- kagol
- wenmine
- zzcr
- kevinmoch
- lichunn
- lhuans
- chilingling
- yaoyun8
- ianxinnew
- hexqi
- gargameljyh



# A number of reviewers added to the pull request
# Set 0 to add all the reviewers (default: 0)
numberOfReviewers: 0
# A list of assignees, overrides reviewers if set
assignees:
- kagol
- wenmine
- zzcr
- kevinmoch
- chilingling
- yaoyun8

# A number of assignees to add to the pull request
# Set to 0 to add all of the assignees.
# Uses numberOfReviewers if unset.
numberOfAssignees: 0

# A list of keywords to be skipped the process that add reviewers if pull requests include it
skipKeywords:
- wip
12 changes: 12 additions & 0 deletions .github/workflows/add-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: 'Auto Assign'
on:
pull_request:
types: [opened, ready_for_review]

jobs:
add-reviews:
runs-on: ubuntu-latest
steps:
- uses: kentaro-m/[email protected]
with:
configuration-path: '../reviewers_for_configs.yml'
33 changes: 33 additions & 0 deletions .github/workflows/push-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CI

on:
push:
branches: []
pull_request:
branches: [develop,main]

jobs:
push-check:
runs-on: ubuntu-latest # windows-latest || macos-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
- name: Get changed files
id: get_changed_files
uses: tj-actions/changed-files@v40
with:
files: |
**.js
**.vue
**.jsx
- name: Install pnpm
run: npm i -g pnpm
- name: Install dependencies
run: pnpm i
- name: Run ESLint
run: npx eslint ${{steps.get_changed_files.outputs.all_changed_files}}
- name: Run Build
run: pnpm run build:plugin
9 changes: 3 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,11 @@ Local startup steps:
git clone [email protected]:username/tiny-engine.git
cd tiny-engine
git remote add upstream [email protected]:opentiny/tiny-engine.git
npm i
pnpm i

# Start the project.
$ npm run serve
$ pnpm dev

# start another terminal
$ cd mockServer
$ npm run dev
```

To submit a PR:
Expand All @@ -67,7 +64,7 @@ To submit a PR:
- Local coding.
- Submit according to [Commit Message Format](https://www.conventionalcommits.org/zh-hans/v1.0.0/) specification. PR that do not conform to the submission specification will not be merged.
- Submit to remote repository: `git push origin branchName`.
- (Optional) Synchronize upstream repository dev branch latest code: `git pull upstream dev`.
- (Optional) Synchronize upstream repository dev branch latest code: `git pull upstream develop`.
- Open the [Pull requests](https://github.com/opentiny/tiny-engine/pulls) link of the TinyEngine code repository and click the New pull request button to submit the PR.
- Project Committer conducts Code Review and makes comments.
- The PR author adjusts the code according to the opinion. Please note that when a branch initiates PR, the subsequent commit will be synchronized automatically, and there is no need to resubmit the PR.
Expand Down
15 changes: 5 additions & 10 deletions CONTRIBUTING.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,18 @@

- 点击 [TinyEngine](https://github.com/opentiny/tiny-engine) 代码仓库右上角的 Fork 按钮,将上游仓库 Fork 到个人仓库
- Clone 个人仓库到本地
- 在 TinyEngine 根目录下运行 `npm install`, 安装依赖
- 在 TinyEngine mockServer 运行 `npm install`, 安装依赖
- 在 TinyEngine 根目录下运行 `npm run serve`,再到 mockServer 目录下运行 `npm run dev`,启动本地开发
- 在 TinyEngine 根目录下运行 `pnpm i`, 安装依赖
- 在 TinyEngine 根目录下运行 `pnpm dev`,启动本地开发

```shell
# username 为用户名,执行前请替换
git clone [email protected]:username/tiny-engine.git
cd tiny-engine
git remote add upstream [email protected]:opentiny/tiny-engine.git
npm i
pnpm i

# 启动项目
$ npm run serve

# start another terminal
$ cd mockServer
$ npm run dev
$ pnpm dev

```

Expand All @@ -68,7 +63,7 @@ $ npm run dev
- 本地编码
- 遵循 Commit Message Format 规范进行提交,不符合提交规范的 PR 将不会被合并
- 提交到远程仓库:git push origin branchName
- (可选)同步上游仓库 dev 分支最新代码:git pull upstream dev
- (可选)同步上游仓库 develop 分支最新代码:git pull upstream develop
- 打开 TinyEngine 代码仓库的 [Pull requests](https://github.com/opentiny/tiny-engine/pulls) 链接,点击 New pull request 按钮提交 PR
- 项目 Committer 进行 Code Review,并提出意见
- PR 作者根据意见调整代码,请注意一个分支发起了 PR 后,后续的 commit 会自动同步,无需重新提交 PR
Expand Down
84 changes: 0 additions & 84 deletions README.en-US.md

This file was deleted.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"build:prod": "pnpm --filter @opentiny/tiny-engine build:prod",
"buildComponentSchemas": "node scripts/buildComponentSchemas.js",
"preview": "pnpm --filter @opentiny/tiny-engine preview",
"checkLint": "eslint . --ext .js,.vue,.jsx",
"lint": "eslint . --ext .js,.vue,.jsx --fix",
"format": "prettier --write **/*{.vue,.js,.ts,.html,.json}",
"prepare": "node -e \"if(require('fs').existsSync('.git')){process.exit(1)}\" || husky install",
Expand Down