Skip to content
Open
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
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
day: monday
time: "21:00"
timezone: Asia/Shanghai
groups:
github-actions:
patterns:
- "*"
2 changes: 2 additions & 0 deletions FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github: ant-design
open_collective: ant-design
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019-present react-component

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
45 changes: 24 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,34 @@
# GitHub Actions
<div align="center">
<h1>React Component GitHub Defaults</h1>
<p><sub><a href="https://ant.design"><img alt="Ant Design" height="14" src="https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg" style="vertical-align: -0.125em;" /></a> Part of the Ant Design ecosystem.</sub></p>
<p>🧰 Shared GitHub community files and workflow templates for rc-component packages.</p>
</div>

🤖 React Component GitHub Actions CI workflow template.
<p align="center">English | <a href="./README.zh-CN.md">简体中文</a></p>

ref: [GitHub docs](https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/sharing-workflows-with-your-organization)
Shared GitHub community files and workflow templates for the React Component organization.

## 💬 How to use?
## Recommended CI

1、On GitHub, navigate to the main page of the repository.
New rc-component repositories should use the reusable workflow from `react-component/rc-test`:

2、Under your repository name, click Actions.
```yml
jobs:
test:
uses: react-component/rc-test/.github/workflows/test-utoo.yml@main
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
```

![](./assets/image/actions-tab.png)
## Workflow Template

3、If your repository already has existing workflows: In the upper-left corner, click New workflow.
1. Open the target repository on GitHub.
2. Go to the Actions tab.
3. Click New workflow when the repository already has workflows.
4. Choose the React Component workflow template.

![](./assets/image/actions-new-workflow.png)
See GitHub's documentation for [sharing workflows with an organization](https://docs.github.com/en/actions/using-workflows/sharing-workflows-secrets-and-runners-with-your-organization).

4、In section titled "Workflows created by React Component". Click **Set up this workflow**.
## License

![](./assets/image/react-component-ci.png)

## 💬 How to migrate from travis CI?

1、Remove `.travis.yml` from the root dir of project.

2、Update build ci badge url in `README.md`.

ref: [Update Badge](https://github.com/react-component/trigger/pull/213)

3、Following [How to use](#how-to-use) to set up github actions.
MIT License. See [LICENSE](./LICENSE) for details.
29 changes: 29 additions & 0 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<div align="center">
<h1>React Component GitHub Defaults</h1>
<p><sub><a href="https://ant.design"><img alt="Ant Design" height="14" src="https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg" style="vertical-align: -0.125em;" /></a> Ant Design 生态的一部分。</sub></p>
<p>🧰 rc-component 仓库共享的 GitHub 社区文件与工作流模板。</p>
</div>

<p align="center"><a href="./README.md">English</a> | 简体中文</p>

React Component 组织共享的 GitHub Actions 工作流模板。

## 使用方式

1. 进入目标仓库的 Actions 页面。
2. 如果仓库已有工作流,点击 New workflow。
3. 选择 React Component 提供的模板并按需提交。

当前推荐新仓库直接使用 [rc-test](https://github.com/react-component/rc-test) 中的 reusable workflow:

```yml
jobs:
test:
uses: react-component/rc-test/.github/workflows/test-utoo.yml@main
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
```

## License

MIT License。详见 [LICENSE](./LICENSE)。
37 changes: 16 additions & 21 deletions profile/README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,24 @@
# Fundamental react components of antd
# React Component

React components foundation of https://ant.design, developed and maintained by the Ant Design Team.
React Component provides the low-level React primitives that power the Ant Design ecosystem.

## Docs

https://react-component.github.io
<p>
<a href="https://ant.design"><img alt="Ant Design" height="14" src="https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg" /></a>
<sub>Part of the Ant Design ecosystem.</sub>
</p>

### 中文
## Packages

- [如何开发一个 react 组件](https://github.com/react-component/react-component.github.io/blob/master/docs/zh-cn/how-to-write-a-react-component.md)
- [react 组件代码规范](https://github.com/react-component/react-component.github.io/blob/master/docs/zh-cn/component-code-style.md)
- [react 组件设计原则](https://github.com/react-component/react-component.github.io/blob/master/docs/zh-cn/component-design.md)
- [kissy 与 react 组件编写异同](https://github.com/react-component/react-component.github.io/blob/master/docs/zh-cn/kissy-react-compare.md)
- Core component packages live under [react-component](https://github.com/react-component).
- Public packages are published as <code>@rc-component/*</code> when possible.
- Shared test workflow lives in [rc-test](https://github.com/react-component/rc-test).
- Shared release helper lives in [@rc-component/np](https://github.com/react-component/np).

## third-party recommended react components
## Docs

- [search index](http://react-components.com)
- [react-bootstrap](https://github.com/react-bootstrap/react-bootstrap/)
- [react-forms](https://github.com/prometheusresearch/react-forms)
- [react-router](https://github.com/rackt/react-router)
- [flux-router-component](https://github.com/yahoo/flux-router-component)
- [Ant Design](https://ant.design)
- [React Component docs](https://react-component.github.io)

## tutorials
## License

- [learning-react](https://github.com/yiminghe/learning-react)
- [awesome-react](https://github.com/enaqx/awesome-react)
- [react-learning](https://github.com/rpflorence/react-training)
- [react-starter-kit](https://github.com/kriasoft/react-starter-kit)
MIT License. See [LICENSE](../LICENSE) for details.
118 changes: 10 additions & 108 deletions workflow-templates/react-component-ci.yml
Original file line number Diff line number Diff line change
@@ -1,114 +1,16 @@
name: CI
name: ✅ test

on:
push:
branches: [ $default-branch ]
branches: [$default-branch]
pull_request:
branches: [ $default-branch ]
branches: [$default-branch]

jobs:
setup:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@master

- uses: actions/setup-node@v1
with:
node-version: '12'

- name: cache package-lock.json
uses: actions/cache@v2
with:
path: package-temp-dir
key: lock-${{ github.sha }}

- name: create package-lock.json
run: npm i --package-lock-only

- name: hack for singe file
run: |
if [ ! -d "package-temp-dir" ]; then
mkdir package-temp-dir
fi
cp package-lock.json package-temp-dir

- name: cache node_modules
id: node_modules_cache_id
uses: actions/cache@v2
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}

- name: install
if: steps.node_modules_cache_id.outputs.cache-hit != 'true'
run: npm ci

lint:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@master

- name: restore cache from package-lock.json
uses: actions/cache@v2
with:
path: package-temp-dir
key: lock-${{ github.sha }}

- name: restore cache from node_modules
uses: actions/cache@v2
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}

- name: lint
run: npm run lint
permissions:
contents: read

needs: setup

compile:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@master

- name: restore cache from package-lock.json
uses: actions/cache@v2
with:
path: package-temp-dir
key: lock-${{ github.sha }}

- name: restore cache from node_modules
uses: actions/cache@v2
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}

- name: compile
run: npm run compile

needs: setup

coverage:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@master

- name: restore cache from package-lock.json
uses: actions/cache@v2
with:
path: package-temp-dir
key: lock-${{ github.sha }}

- name: restore cache from node_modules
uses: actions/cache@v2
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}

- name: coverage
run: npm test -- --coverage && bash <(curl -s https://codecov.io/bash)

needs: setup
jobs:
test:
uses: react-component/rc-test/.github/workflows/test-utoo.yml@main
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}