phase7 ab #11
This file contains hidden or 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
| name: Frontend CI | |
| on: | |
| push: | |
| branches: [main, dev] | |
| paths: | |
| - 'src/**' | |
| - 'package.json' | |
| - 'package-lock.json' | |
| - 'tsconfig.json' | |
| - 'eslint.config.js' | |
| - '.prettierrc' | |
| - '.github/workflows/frontend-ci.yml' | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - 'src/**' | |
| - 'package.json' | |
| - 'tsconfig.json' | |
| - 'eslint.config.js' | |
| - '.prettierrc' | |
| jobs: | |
| lint: | |
| name: ESLint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Install dependencies | |
| run: | | |
| rm -rf node_modules package-lock.json | |
| npm install | |
| - name: Run ESLint | |
| run: npm run lint | |
| format: | |
| name: Prettier | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Install dependencies | |
| run: | | |
| rm -rf node_modules package-lock.json | |
| npm install | |
| - name: Check formatting | |
| run: npm run format:check | |
| typecheck: | |
| name: TypeScript | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Install dependencies | |
| run: | | |
| rm -rf node_modules package-lock.json | |
| npm install | |
| - name: Run type check | |
| run: npx tsc --noEmit | |
| test: | |
| name: Vitest | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Install dependencies | |
| run: | | |
| rm -rf node_modules package-lock.json | |
| npm install | |
| - name: Run tests | |
| run: npm run test |