Skip to content

Commit 8df5fe6

Browse files
authored
Create github action
1 parent a68e86e commit 8df5fe6

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/node.js.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Project CICD
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Use Node.js 18
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: '18'
19+
cache: 'npm'
20+
21+
- name: Install Dependencies
22+
run: npm ci
23+
24+
- name: Run lint
25+
run: npm run lint
26+
27+
- name: Run test with coverage
28+
run: npm run test:cov
29+
30+
build:
31+
runs-on: ubuntu-latest
32+
33+
steps:
34+
- uses: actions/checkout@v4
35+
- name: Use Node.js ${{ matrix.node-version }}
36+
uses: actions/setup-node@v4
37+
with:
38+
node-version: '18'
39+
cache: 'npm'
40+
41+
- name: Install Dependencies
42+
run: npm ci
43+
44+
- name: Run Build
45+
run: npm run build

0 commit comments

Comments
 (0)