Skip to content

Commit

Permalink
Refactor : CI 업데이트 - npm cache 사용
Browse files Browse the repository at this point in the history
  • Loading branch information
jobkaeHenry committed Nov 3, 2023
1 parent bae9b0d commit 316a2d1
Showing 1 changed file with 24 additions and 22 deletions.
46 changes: 24 additions & 22 deletions .github/workflows/Client-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,38 @@ name: Client Unit test

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]

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
- 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: install deps
run: npm install
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: |
- 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({
Expand All @@ -40,4 +42,4 @@ jobs:
body:"[Unit test] 유닛테스트를 통과하지 못했습니다.",
event: "REQUEST_CHANGES"
})
if: failure()
if: failure()

0 comments on commit 316a2d1

Please sign in to comment.