Skip to content

Commit 7c29865

Browse files
committed
ci: set up github ci pipeline
1 parent d1068f2 commit 7c29865

File tree

2 files changed

+116
-0
lines changed

2 files changed

+116
-0
lines changed

.github/pull_request_template.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
## How Has This Been Tested?
2+
3+
<!--- Please describe how you tested your changes to make sure it's ready to be merged. -->
4+
5+
## Checklist
6+
7+
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
8+
9+
- [ ] Branch name is in `fix/camelCasedDescription` format
10+
- [ ] My code follows the code style and I ran `npm run lint` to make sure so
11+
- [ ] No changes to the documentation are required OR I have updated the documentation
12+
- [ ] PR title is in `chore: remove lodash` (standard commit) format

.github/workflows/ci.yml

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
name: CI
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout commit
10+
uses: actions/checkout@v2
11+
12+
- name: Use Node.js
13+
uses: actions/setup-node@v1
14+
with:
15+
node-version: '12.x'
16+
17+
- name: Cache NPM
18+
uses: actions/cache@v1
19+
with:
20+
path: ~/.npm
21+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
22+
restore-keys: |
23+
${{ runner.os }}-node-
24+
25+
- name: Install Dependencies
26+
run: npm ci
27+
28+
lint:
29+
runs-on: ubuntu-latest
30+
needs: build
31+
steps:
32+
- name: Checkout commit
33+
uses: actions/checkout@v2
34+
35+
- name: Use Node.js
36+
uses: actions/setup-node@v1
37+
with:
38+
node-version: '12.x'
39+
40+
- name: Cache NPM
41+
uses: actions/cache@v1
42+
with:
43+
path: ~/.npm
44+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
45+
restore-keys: |
46+
${{ runner.os }}-node-
47+
48+
- name: Install Dependencies
49+
run: npm ci
50+
51+
- name: Run linter
52+
run: npm run lint
53+
54+
security:
55+
runs-on: ubuntu-latest
56+
needs: build
57+
steps:
58+
- name: Checkout commit
59+
uses: actions/checkout@v2
60+
61+
- name: Use Node.js
62+
uses: actions/setup-node@v1
63+
with:
64+
node-version: '12.x'
65+
66+
- name: Cache NPM
67+
uses: actions/cache@v1
68+
with:
69+
path: ~/.npm
70+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
71+
restore-keys: |
72+
${{ runner.os }}-node-
73+
74+
- name: Install Dependencies
75+
run: npm ci
76+
77+
- name: Run security check
78+
run: npm run audit-security
79+
80+
test:
81+
runs-on: ubuntu-latest
82+
needs: build
83+
steps:
84+
- name: Checkout commit
85+
uses: actions/checkout@v2
86+
87+
- name: Use Node.js
88+
uses: actions/setup-node@v1
89+
with:
90+
node-version: '12.x'
91+
92+
- name: Cache NPM
93+
uses: actions/cache@v1
94+
with:
95+
path: ~/.npm
96+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
97+
restore-keys: |
98+
${{ runner.os }}-node-
99+
100+
- name: Install Dependencies
101+
run: npm ci
102+
103+
- name: Run tests
104+
run: npm run test

0 commit comments

Comments
 (0)