Skip to content

Commit 08b9c49

Browse files
authored
chore: use actions (#241)
* Create react-component-ci.yml * chore: use actions
1 parent 3776697 commit 08b9c49

File tree

6 files changed

+154
-47
lines changed

6 files changed

+154
-47
lines changed
+114
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
setup:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: checkout
14+
uses: actions/checkout@master
15+
16+
- uses: actions/setup-node@v1
17+
with:
18+
node-version: '12'
19+
20+
- name: cache package-lock.json
21+
uses: actions/cache@v2
22+
with:
23+
path: package-temp-dir
24+
key: lock-${{ github.sha }}
25+
26+
- name: create package-lock.json
27+
run: npm i --package-lock-only
28+
29+
- name: hack for singe file
30+
run: |
31+
if [ ! -d "package-temp-dir" ]; then
32+
mkdir package-temp-dir
33+
fi
34+
cp package-lock.json package-temp-dir
35+
36+
- name: cache node_modules
37+
id: node_modules_cache_id
38+
uses: actions/cache@v2
39+
with:
40+
path: node_modules
41+
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
42+
43+
- name: install
44+
if: steps.node_modules_cache_id.outputs.cache-hit != 'true'
45+
run: npm ci
46+
47+
lint:
48+
runs-on: ubuntu-latest
49+
steps:
50+
- name: checkout
51+
uses: actions/checkout@master
52+
53+
- name: restore cache from package-lock.json
54+
uses: actions/cache@v2
55+
with:
56+
path: package-temp-dir
57+
key: lock-${{ github.sha }}
58+
59+
- name: restore cache from node_modules
60+
uses: actions/cache@v2
61+
with:
62+
path: node_modules
63+
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
64+
65+
- name: lint
66+
run: npm run lint
67+
68+
needs: setup
69+
70+
compile:
71+
runs-on: ubuntu-latest
72+
steps:
73+
- name: checkout
74+
uses: actions/checkout@master
75+
76+
- name: restore cache from package-lock.json
77+
uses: actions/cache@v2
78+
with:
79+
path: package-temp-dir
80+
key: lock-${{ github.sha }}
81+
82+
- name: restore cache from node_modules
83+
uses: actions/cache@v2
84+
with:
85+
path: node_modules
86+
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
87+
88+
- name: compile
89+
run: npm run compile
90+
91+
needs: setup
92+
93+
coverage:
94+
runs-on: ubuntu-latest
95+
steps:
96+
- name: checkout
97+
uses: actions/checkout@master
98+
99+
- name: restore cache from package-lock.json
100+
uses: actions/cache@v2
101+
with:
102+
path: package-temp-dir
103+
key: lock-${{ github.sha }}
104+
105+
- name: restore cache from node_modules
106+
uses: actions/cache@v2
107+
with:
108+
path: node_modules
109+
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
110+
111+
- name: coverage
112+
run: npm test -- --coverage && bash <(curl -s https://codecov.io/bash)
113+
114+
needs: setup

.travis.yml

-17
This file was deleted.

HISTORY.md renamed to CHANGELOG.md

+20-21
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,81 @@
1-
# History
2-
----
1+
# Changelog
32

4-
### 3.6.0
3+
## 3.6.0
54

65
- Support React 16.
76

8-
### 3.5.0
7+
## 3.5.0
98

109
- Add id for ARIA.
1110

12-
### 3.4.4
11+
## 3.4.4
1312

1413
- Fix babel-runtime module not found
1514

16-
### 3.4.3
15+
## 3.4.3
1716

1817
- Fix `createClass` and `PropTypes` warning.
1918

20-
### 3.4.0
19+
## 3.4.0
2120

2221
- allow overlay prop as function type
2322

24-
### 3.3.0
23+
## 3.3.0
2524

2625
- support arrowContent prop
2726

28-
### 3.2.0
27+
## 3.2.0
2928

3029
- support destroyTooltipOnHide prop
3130

32-
### 3.0.0
31+
## 3.0.0
3332

3433
- only support react 0.14
3534
- add align prop to allow set offset and targetOffset when placement's type is String
3635

37-
### 2.10.0
36+
## 2.10.0
3837

3938
- auto adjust align if current tooltip is not visible
4039

41-
### 2.9.0
40+
## 2.9.0
4241

4342
- support 'topLeft', 'topRight', 'bottomLeft', 'bottomRight' for placement
4443

45-
### 2.8.0
44+
## 2.8.0
4645

4746
- add getTooltipContainer prop
4847

49-
### 2.7.0
48+
## 2.7.0
5049

5150
- add overlayClassName prop #16
5251
- split delay into mouseEnterDelay and mouseLeaveDelay #15
5352

54-
### 2.6.0
53+
## 2.6.0
5554

5655
remove renderOverlayToBody prop. defaults to true
5756

58-
### 2.5.0 / 2015-07-28
57+
## 2.5.0 / 2015-07-28
5958

6059
use rc-animate & rc-align
6160

62-
### 2.4.0 / 2015-07-08
61+
## 2.4.0 / 2015-07-08
6362

6463
revert to document click and fix focus/click conflict [#13](https://github.com/react-component/tooltip/issues/6)
6564

66-
### 2.3.0 / 2015-07-07
65+
## 2.3.0 / 2015-07-07
6766

6867
`new` [#7](https://github.com/react-component/tooltip/issues/7) support delay prop
6968

70-
### 2.2.0 / 2015-06-30
69+
## 2.2.0 / 2015-06-30
7170

7271
- use mask instead of document click
7372

74-
### 2.1.0 / 2015-06-15
73+
## 2.1.0 / 2015-06-15
7574

7675
- support overlayStyle props
7776
- support wrapStyle props
7877

79-
### 2.0.0 / 2015-06-08
78+
## 2.0.0 / 2015-06-08
8079

8180
- support click document to hide
8281
- support animation props

LICENSE

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
The MIT License (MIT)
2+
23
Copyright (c) 2015-present Alipay.com, https://www.alipay.com/
34

45
Permission is hereby granted, free of charge, to any person obtaining a copy

README.md

+3-9
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,13 @@
11
# rc-tooltip
2-
---
32

43
React Tooltip
54

6-
[![NPM version][npm-image]][npm-url]
7-
[![build status][travis-image]][travis-url]
8-
[![Test coverage][coveralls-image]][coveralls-url]
9-
[![gemnasium deps][gemnasium-image]][gemnasium-url]
10-
[![node version][node-image]][node-url]
11-
[![npm download][download-image]][download-url]
5+
[![NPM version][npm-image]][npm-url] [![build status][github-actions-image]][github-actions-url] [![Test coverage][coveralls-image]][coveralls-url] [![gemnasium deps][gemnasium-image]][gemnasium-url] [![node version][node-image]][node-url] [![npm download][download-image]][download-url]
126

137
[npm-image]: https://img.shields.io/npm/v/rc-tooltip.svg?style=flat-square
148
[npm-url]: https://npmjs.org/package/rc-tooltip
15-
[travis-image]: https://img.shields.io/travis/react-component/tooltip.svg?style=flat-square
16-
[travis-url]: https://travis-ci.org/react-component/tooltip
9+
[github-actions-image]: https://github.com/react-component/tooltip/workflows/CI/badge.svg
10+
[github-actions-url]: https://github.com/react-component/tooltip/actions
1711
[coveralls-image]: https://img.shields.io/coveralls/react-component/tooltip.svg?style=flat-square
1812
[coveralls-url]: https://coveralls.io/r/react-component/tooltip?branch=master
1913
[gemnasium-image]: https://img.shields.io/gemnasium/react-component/tooltip.svg?style=flat-square

tsconfig.json

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"compilerOptions": {
3+
"target": "esnext",
4+
"moduleResolution": "node",
5+
"baseUrl": "./",
6+
"jsx": "preserve",
7+
"declaration": true,
8+
"skipLibCheck": true,
9+
"esModuleInterop": true,
10+
"paths": {
11+
"@/*": ["src/*"],
12+
"@@/*": ["src/.umi/*"],
13+
"rc-tooltip": ["src/index.ts"]
14+
}
15+
}
16+
}

0 commit comments

Comments
 (0)