-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #174 from boostcampwm-2024/be-feature-#173
monorepo로 변경
- Loading branch information
Showing
145 changed files
with
9,205 additions
and
272 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,196 +1,110 @@ | ||
name: OctoDocs CI Pipeline | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- develop | ||
push: | ||
branches: | ||
- develop | ||
pull_request: | ||
branches: | ||
- develop | ||
push: | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
setup-backend: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
cache-key: ${{ steps.cache-backend-deps.outputs.cache-hit }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "23" | ||
|
||
# 백엔드 의존성 캐시 설정 | ||
- name: Cache Yarn dependencies for backend | ||
id: cache-backend-deps | ||
uses: actions/cache@v3 | ||
with: | ||
path: backend/node_modules | ||
key: ${{ runner.os }}-backend-yarn-${{ hashFiles('backend/yarn.lock') }} | ||
|
||
# 백엔드 의존성 설치 | ||
- name: Install backend dependencies | ||
if: steps.cache-backend-deps.outputs.cache-hit != 'true' | ||
working-directory: ./backend | ||
run: yarn install | ||
|
||
setup-frontend: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
cache-key: ${{ steps.cache-frontend-deps.outputs.cache-hit }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "23" | ||
|
||
# 프론트엔드 의존성 캐시 설정 | ||
- name: Cache Yarn dependencies for frontend | ||
id: cache-frontend-deps | ||
uses: actions/cache@v3 | ||
with: | ||
path: frontend/node_modules | ||
key: ${{ runner.os }}-frontend-yarn-${{ hashFiles('frontend/yarn.lock') }} | ||
|
||
# 프론트엔드 의존성 설치 | ||
- name: Install frontend dependencies | ||
if: steps.cache-frontend-deps.outputs.cache-hit != 'true' | ||
working-directory: ./frontend | ||
run: yarn install | ||
|
||
backend-lint: | ||
runs-on: ubuntu-latest | ||
needs: setup-backend | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "23" | ||
|
||
# 백엔드 의존성 캐시 복원 | ||
- name: Restore Yarn dependencies for backend | ||
uses: actions/cache@v3 | ||
with: | ||
path: backend/node_modules | ||
key: ${{ runner.os }}-backend-yarn-${{ hashFiles('backend/yarn.lock') }} | ||
|
||
# 백엔드 린트 실행 | ||
- name: Run backend lint | ||
working-directory: ./backend | ||
run: yarn lint | ||
continue-on-error: true | ||
|
||
# 백엔드 린트 경고 포스트 | ||
- name: Post backend lint warning if any | ||
if: failure() | ||
run: echo "⚠️ 백엔드 lint 실행 도중 경고가 발생했습니다. 확인해주세요." | ||
|
||
frontend-lint: | ||
runs-on: ubuntu-latest | ||
needs: setup-frontend | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "23" | ||
|
||
# 프론트엔드 의존성 캐시 복원 | ||
- name: Restore Yarn dependencies for frontend | ||
uses: actions/cache@v3 | ||
with: | ||
path: frontend/node_modules | ||
key: ${{ runner.os }}-frontend-yarn-${{ hashFiles('frontend/yarn.lock') }} | ||
|
||
# 프론트엔드 린트 실행 | ||
- name: Run frontend lint | ||
working-directory: ./frontend | ||
run: yarn lint | ||
continue-on-error: true | ||
|
||
# 프론트엔드 린트 경고 포스트 | ||
- name: Post frontend lint warning if any | ||
if: failure() | ||
run: echo "⚠️ 프론트엔드 lint 실행 도중 경고가 발생했습니다. 확인해주세요." | ||
|
||
backend-build: | ||
runs-on: ubuntu-latest | ||
needs: setup-backend | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "23" | ||
|
||
# 백엔드 의존성 캐시 복원 | ||
- name: Restore Yarn dependencies for backend | ||
uses: actions/cache@v3 | ||
with: | ||
path: backend/node_modules | ||
key: ${{ runner.os }}-backend-yarn-${{ hashFiles('backend/yarn.lock') }} | ||
|
||
# 백엔드 빌드 실행 | ||
- name: Run backend build | ||
working-directory: ./backend | ||
run: yarn build | ||
|
||
frontend-build: | ||
runs-on: ubuntu-latest | ||
needs: setup-frontend | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "23" | ||
|
||
# 프론트엔드 의존성 캐시 복원 | ||
- name: Restore Yarn dependencies for frontend | ||
uses: actions/cache@v3 | ||
with: | ||
path: frontend/node_modules | ||
key: ${{ runner.os }}-frontend-yarn-${{ hashFiles('frontend/yarn.lock') }} | ||
|
||
# 프론트엔드 빌드 실행 | ||
- name: Run frontend build | ||
working-directory: ./frontend | ||
run: yarn build | ||
|
||
backend-test: | ||
runs-on: ubuntu-latest | ||
needs: [setup-backend, backend-build] | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "23" | ||
|
||
# 백엔드 의존성 캐시 복원 | ||
- name: Restore Yarn dependencies for backend | ||
uses: actions/cache@v3 | ||
with: | ||
path: backend/node_modules | ||
key: ${{ runner.os }}-backend-yarn-${{ hashFiles('backend/yarn.lock') }} | ||
|
||
# 백엔드 테스트 실행 | ||
- name: Run backend tests | ||
working-directory: ./backend | ||
run: yarn test | ||
setup: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
cache-key: ${{ steps.cache-backend-deps.outputs.cache-hit }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "23" | ||
|
||
# turbo 의존성 캐시 설정 | ||
- name: Cache Yarn dependencies for backend | ||
id: cache-deps | ||
uses: actions/cache@v3 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} | ||
|
||
# turbo 의존성 설치 | ||
- name: Install backend dependencies | ||
if: steps.cache-deps.outputs.cache-hit != 'true' | ||
run: yarn install | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
needs: setup | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "23" | ||
|
||
# 의존성 캐시 복원 | ||
- name: Restore Yarn dependencies for backend | ||
uses: actions/cache@v3 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} | ||
|
||
# 백엔드 린트 실행 | ||
- name: Run lint | ||
run: yarn lint | ||
continue-on-error: true | ||
|
||
# 백엔드 린트 경고 포스트 | ||
- name: Post backend lint warning if any | ||
if: failure() | ||
run: echo "⚠️ lint 실행 도중 경고가 발생했습니다. 확인해주세요." | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
needs: setup | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "23" | ||
# 루트 의존성 캐시 설정 | ||
- name: Cache Yarn dependencies for root | ||
id: cache-deps | ||
uses: actions/cache@v3 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} | ||
|
||
# 빌드 실행 | ||
- name: Run build | ||
run: yarn build | ||
test: | ||
runs-on: ubuntu-latest | ||
needs: [setup, build] | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "23" | ||
|
||
# 의존성 캐시 복원 | ||
- name: Restore Yarn dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} | ||
|
||
# 테스트 실행 | ||
- name: Run tests | ||
run: yarn test |
Oops, something went wrong.