-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (40 loc) · 1.09 KB
/
Client-CI.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Client Unit test
on:
pull_request:
branches: ["main"]
paths:
- "client/**"
jobs:
run_test:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v3
- name: Set up Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x
cache-dependency-path: ./client
cache: "npm"
- name: install deps
run: npm ci
working-directory: client
- name: run test
run: npm run test:ci
working-directory: client
- name: Request change
uses: actions/[email protected]
with:
github-token: ${{github.token}}
script: |
const ref = "${{github.ref}}"
const pull_number = Number(ref.split("/")[2])
await github.pulls.createReview({
...context.repo,
pull_number,
body:"[Unit test] 유닛테스트를 통과하지 못했습니다.",
event: "REQUEST_CHANGES"
})
if: failure()