Skip to content

Commit 08f8f01

Browse files
committed
chore: refactor CI workflows
1 parent c496b32 commit 08f8f01

File tree

2 files changed

+52
-5
lines changed

2 files changed

+52
-5
lines changed

.github/workflows/nodejs.yml renamed to .github/workflows/daily-project-check.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
name: Node CI
1+
name: Daily project check
22

3-
on:
4-
push:
5-
pull_request:
3+
on:
64
schedule:
75
# build runs everyday at 6AM UTC
86
- cron: '0 6 * * *'
@@ -39,7 +37,8 @@ jobs:
3937

4038
steps:
4139
- uses: actions/checkout@v1
42-
- uses: actions/setup-node@v1
40+
- name: Use Node.js 12
41+
uses: actions/setup-node@v1
4342
with:
4443
node-version: 12
4544
- name: e2e chrome test

.github/workflows/project-check.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Project check
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
build:
9+
10+
runs-on: ubuntu-latest
11+
12+
strategy:
13+
matrix:
14+
node-version: [8.x, 10.x, 12.x]
15+
os: [ubuntu-latest, windows-latest, macOS-latest]
16+
17+
steps:
18+
- uses: actions/checkout@v1
19+
- name: Use Node.js ${{ matrix.node-version }}
20+
uses: actions/setup-node@v1
21+
with:
22+
node-version: ${{ matrix.node-version }}
23+
- name: project check
24+
run: |
25+
npm i
26+
npm run clearCache
27+
npm run build
28+
npm run lint
29+
npm run test:unit
30+
env:
31+
CI: true
32+
33+
e2e-chrome:
34+
35+
runs-on: windows-latest
36+
37+
steps:
38+
- uses: actions/checkout@v1
39+
- name: Use Node.js 12
40+
uses: actions/setup-node@v1
41+
with:
42+
node-version: 12
43+
- name: e2e chrome test
44+
run: |
45+
npm i
46+
npm run test:e2e
47+
env:
48+
BROWSER: chrome

0 commit comments

Comments
 (0)