-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (34 loc) · 890 Bytes
/
test.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
name: OPEN PR 테스트
on:
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-18.04
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2
- name: install dependency
run: |
cd frontend
yarn
- name: test
run: |
cd frontend
yarn run test
- name: pr-comment if test failed
uses: actions/[email protected]
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const ref = "${{github.ref}}"
const pull_number = Number(ref.split("/")[2])
await github.pulls.createReview({
...context.repo,
pull_number,
body: "실패한 테스트코드가 존재합니다.",
event: "REQUEST_CHANGES"
})
if: failure()