-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (36 loc) · 1.06 KB
/
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
38
39
40
41
42
43
name: PR Test
on:
pull_request:
branches:
- dev
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: npm install
- name: Generate Prisma Client
run: npx prisma generate
- name: Run tests
run: npm test
- name: if fail
uses: actions/github-script@v5
with:
github-token: ${{ secrets.YOUR_PERSONAL_ACCESS_TOKEN }}
script: |
const ref = "${{github.ref}}"
const pull_number = Number(ref.split("/")[2])
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pull_number,
body: "테스트코드를 다시 확인해주세요."
})
await github.rest.pulls.update({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: pull_number,
state: "closed"
});
if: failure()