Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
46 changes: 46 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
schedule:
- cron: '0 2 * * *'

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
node-version: [16.x]
os: [ubuntu-latest]

steps:
- name: Checkout Git Source
uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install Dependencies
run: npm i -g npminstall && npminstall

- name: Continuous Integration
run: npm run ci

- name: Code Coverage
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Actions Release

on:
push:
branches: [ master ]

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
node-version: [16.x]
os: [ubuntu-latest]

steps:
- name: Checkout Git Source
uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install Dependencies
run: npm i -g npminstall && npminstall

- name: Continuous integration
run: |
run: npm run ci

- name: Semantic Release
run: |
npm run semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# react-cnode
# React-CNode.js

CNode 社区 React 版本
> Frontend Powered By React For CNode.js

## Getting Started

Expand All @@ -13,5 +13,5 @@ $ yarn
Start the dev server,

```bash
$ yarn start
$ yarn dev
```
47 changes: 44 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
{
"private": true,
"name": "react-cnode",
"description": "Frontend Powered By React For CNode.js",
"version": "development",
"private": false,
"license": "MIT",
"scripts": {
"dev": "umi dev",
"build": "umi build",
"postinstall": "umi generate tmp",
"prettier": "prettier --write '**/*.{js,jsx,tsx,ts,less,md,json}'",
"ci": "npm run test",
"test": "umi-test",
"test:coverage": "umi-test --coverage"
"test:coverage": "umi-test --coverage",
"semantic-release": "semantic-release"
},
"gitHooks": {
"pre-commit": "lint-staged"
Expand All @@ -19,6 +25,37 @@
"prettier --parser=typescript --write"
]
},
"ci": {
"type": "github",
"os": {
"github": "linux"
},
"version": "16.x"
},
"release": {
"branche": "master",
"tagFormat": "${version}",
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/changelog",
{
"changelogFile": "History.md"
}
],
[
"@semantic-release/github",
{
"assets": {
"path": "dist",
"label": "Assets Distribution"
},
"addReleases": "bottom"
}
]
]
},
"dependencies": {
"dotenv": "^10.0.0",
"react": "17.x",
Expand All @@ -30,7 +67,9 @@
"@ant-design/pro-layout": "^6.32.1",
"@ant-design/pro-list": "^1.21.12",
"@ant-design/pro-table": "^2.61.9",
"@semantic-release/changelog": "^6.0.1",
"@types/dotenv": "^8.2.0",
"@types/jest": "^27.4.0",
"@types/markdown-it": "^12.2.3",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
Expand All @@ -40,12 +79,14 @@
"@umijs/test": "^3.5.20",
"ahooks": "^3.1.3",
"dayjs": "^1.10.7",
"egg-ci": "^1.19.0",
"lint-staged": "^10.0.7",
"markdown-it": "^12.3.0",
"prettier": "^2.2.0",
"react-markdown-editor-lite": "^1.3.2",
"semantic-release": "^18.0.1",
"typescript": "^4.1.2",
"umi": "^3.5.20",
"yorkie": "^2.0.0"
}
}
}
5 changes: 5 additions & 0 deletions tests/util.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
describe('util.test.ts', () => {
it('demo', () => {
expect(10).toEqual(10);
});
});