Skip to content

#351 fix(fe): lint 수정 #400

#351 fix(fe): lint 수정

#351 fix(fe): lint 수정 #400

Workflow file for this run

name: FRONTEND-CI
on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- dev
- main
paths:
- 'src/frontend/**'
- './fe-ci.yml'
push:
branches:
- fe-refac/bundle
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: false
jobs:
lint-test:
if: ${{ github.actor != 'l10nbot' }}
runs-on: ubuntu-latest
timeout-minutes: 10
env:
TZ: Asia/Seoul
PNPM_STORE: /home/runner/setup-pnpm/node_modules/.bin/store/v3
strategy:
matrix:
task: [lint, test]
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.6.4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.15.0
cache: 'pnpm'
cache-dependency-path: 'src/frontend/pnpm-lock.yaml'
- name: Restore pnpm store cache
uses: actions/cache@v4
with:
path: ${{ env.PNPM_STORE }}
key: ${{ runner.os }}-pnpm-${{ hashFiles('src/frontend/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- name: Restore Turbo cache
uses: actions/cache@v4
with:
path: src/frontend/.turbo
key: ${{ runner.os }}-turbo-${{ hashFiles('src/frontend/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-turbo-
- name: Install Dependencies (if necessary)
working-directory: src/frontend
run: |
if [ ! -d "node_modules" ]; then
pnpm install --no-frozen-lockfile --prefer-offline
fi
- name: Run Task with Cache
working-directory: src/frontend
run: |
if [ "${{ matrix.task }}" = "lint" ]; then
pnpm run lint --parallel
elif [ "${{ matrix.task }}" = "test" ]; then
pnpm run test --parallel
fi
build:
if: ${{ github.actor != 'l10nbot' }}
runs-on: ubuntu-latest
timeout-minutes: 10
env:
TZ: Asia/Seoul
PNPM_STORE: /home/runner/setup-pnpm/node_modules/.bin/store/v3
strategy:
matrix:
package: ['web', '@workspace/ui']
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.6.4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.15.0
cache: 'pnpm'
cache-dependency-path: 'src/frontend/pnpm-lock.yaml'
- name: Restore pnpm store cache
uses: actions/cache@v4
with:
path: ${{ env.PNPM_STORE }}
key: ${{ runner.os }}-pnpm-${{ hashFiles('src/frontend/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- name: Restore Turbo cache
uses: actions/cache@v4
with:
path: src/frontend/.turbo
key: ${{ runner.os }}-turbo-${{ hashFiles('src/frontend/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-turbo-
- name: Restore Next.js cache (for web)
if: matrix.package == 'web'
uses: actions/cache@v4
with:
path: src/frontend/apps/web/.next
key: ${{ runner.os }}-nextjs-${{ hashFiles('src/frontend/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-nextjs-
- name: Install Dependencies
working-directory: src/frontend
run: |
pnpm install --frozen-lockfile --prefer-offline
- name: Run Build with Cache (Web)
if: matrix.package == 'web'
working-directory: src/frontend
run: |
pnpm run build --filter=web --parallel
- name: Run Build with Cache (@workspace/ui)
if: matrix.package == '@workspace/ui'
working-directory: src/frontend
run: |
pnpm run build --filter=@workspace/ui --parallel