Skip to content

Commit 0d8d6b7

Browse files
committed
chore(.github): add project check workflows
1 parent 007c652 commit 0d8d6b7

File tree

3 files changed

+104
-2
lines changed

3 files changed

+104
-2
lines changed
+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Daily project check
2+
3+
on:
4+
schedule:
5+
# build runs every weekday at 3AM UTC
6+
- cron: '0 3 * * 1-5'
7+
8+
jobs:
9+
build:
10+
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [14.x]
16+
os: [ubuntu-latest, windows-latest, macOS-latest]
17+
18+
steps:
19+
- uses: actions/checkout@v1
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v1
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
- name: project check
25+
run: |
26+
npm i
27+
npm run build-lib:prod
28+
npm run test-lib:prod
29+
npm run lint
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 14
40+
uses: actions/setup-node@v1
41+
with:
42+
node-version: 14
43+
- name: e2e chrome test
44+
run: |
45+
choco install googlechrome
46+
npm i
47+
npm run e2e
48+
env:
49+
BROWSER: chrome

.github/workflows/project-check.yml

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

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@
1818
"ng": "ng",
1919
"postinstall": "ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points",
2020
"build-lib:dev": "ng build @coreui/angular --watch",
21-
"build-lib": "ng build @coreui/angular --prod",
22-
"test-lib": "ng test @coreui/angular",
21+
"build-lib:prod": "ng build @coreui/angular --prod",
22+
"test-lib:dev": "ng test @coreui/angular",
23+
"test-lib:prod": "ng test @coreui/angular --watch=false",
2324
"start": "ng serve",
2425
"test": "ng test",
2526
"lint": "ng lint",

0 commit comments

Comments
 (0)