Skip to content

Commit aae18d8

Browse files
committed
ci: add pr unit test and run unit test while releasing
1 parent e857c62 commit aae18d8

File tree

2 files changed

+30
-2
lines changed

2 files changed

+30
-2
lines changed

.github/workflows/ci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v4
13+
14+
- name: Use node.js
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: '20.x'
18+
registry-url: 'https://registry.npmjs.org'
19+
cache: 'pnpm'
20+
21+
- name: Install pnpm
22+
uses: pnpm/action-setup@v4
23+
24+
- name: Installing Dependencies
25+
run: pnpm install
26+
27+
- name: Running unit Test
28+
run: pnpm run test:unit

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ jobs:
3333
if: steps.cache-dependencies.outputs.cache-hit != 'true'
3434
run: pnpm install
3535

36-
- name: Running Test
37-
run: pnpm run test
36+
- name: Running unit Test
37+
run: pnpm run test:unit
3838

3939
- name: Running Build
4040
run: pnpm run build

0 commit comments

Comments
 (0)