Merge pull request #86 from real-venus/feat/utility-network-layer #98
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: | |
| pull_request: | |
| branches: [main, develop] | |
| push: | |
| branches: [main] | |
| env: | |
| NODE_VERSION: 20 | |
| jobs: | |
| lint-and-typecheck: | |
| name: Lint & TypeScript Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run lint | |
| - run: npx tsc --noEmit | |
| build: | |
| name: Build | |
| needs: lint-and-typecheck | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run build | |
| test: | |
| name: E2E Tests | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: npm | |
| - run: npm ci | |
| - name: Install Playwright Browsers | |
| run: npx playwright install chromium --with-deps | |
| - name: Start dev server | |
| run: npm run dev & npx wait-on http://localhost:3000 | |
| - name: Run Playwright tests | |
| run: npx playwright test | |
| - name: Stop dev server | |
| if: always() | |
| run: kill $(lsof -t -i:3000) 2>/dev/null || true |