Skip to content

Commit

Permalink
document(script): pr-check.yml파일 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
KimKyuHoi committed Dec 2, 2024
1 parent 22c4fcb commit f815c51
Showing 1 changed file with 22 additions and 28 deletions.
50 changes: 22 additions & 28 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,46 @@
name: PR Check
name: PR and Push Check

on:
pull_request:
types: [opened, synchronize, reopened]
branches: ["*"]
branches:
- main
- develop
push:
branches: ["*"]
branches:
- '**' # 모든 브랜치에 대해 실행

jobs:
build-and-test:
name: Build and Test
pr-push-check:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v4
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "20"

- name: Enable Corepack
run: corepack enable

- name: Setup yarn
run: corepack prepare [email protected] --activate

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
node-version: '18' # 프로젝트에서 사용하는 Node.js 버전으로 설정

- name: Cache yarn dependencies
uses: actions/cache@v4
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
path: ~/.yarn/cache
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Set up Yarn 2 (Berry)
run: corepack enable && corepack prepare [email protected] --activate

- name: Install dependencies
run: yarn install --immutable --inline-builds --mode=skip-build
run: yarn install --immutable --frozen-lockfile

- name: Run lint
- name: Run lint checks
run: yarn lint

- name: Run build
run: yarn build
- name: Run format check
run: yarn format --check

- name: Check yarn.lock integrity
run: yarn install --immutable
- name: Build the project
run: yarn build # 빌드 체크 추가

0 comments on commit f815c51

Please sign in to comment.