diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d44f815..fb942f9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,7 @@ name: CI on: pull_request: - branches: [main] + branches: [main, develop] jobs: build: @@ -17,13 +17,18 @@ jobs: with: node-version: '18.18.2' - - name: pnpm 설치중.. - run: npm install -g pnpm - - name: 종속성 설치중... - run: pnpm install + run: npm install working-directory: ./fe - name: 빌드 중.. - run: pnpm build + run: npm run build working-directory: ./fe + + # - name: 테스트 실행 중.. + # run: npm run test + # working-directory: ./fe + + # - name: 코드 린트 체크 중.. + # run: npm run lint + # working-directory: ./fe diff --git a/.github/workflows/code_review.yml b/.github/workflows/code_review.yml new file mode 100644 index 0000000..85960cf --- /dev/null +++ b/.github/workflows/code_review.yml @@ -0,0 +1,33 @@ +name: Code Review + +permissions: + contents: read + pull-requests: write + +on: + pull_request: + types: [opened, reopened] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + # actions/checkout의 최신 버전 사용 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '18' # Node.js의 최신 LTS 버전으로 업데이트 + + - name: Install dependencies + run: npm install + working-directory: ./fe + + - name: Run GPT-based Code Review + uses: anc95/ChatGPT-CodeReview@main + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + LANGUAGE: 'TypeScript' # 프로젝트의 언어를 TypeScript로 설정 + MAX_COMMENTS: 5 # 리뷰어가 생성할 최대 코멘트 수