fix: landing page & visualizer UI/UX makeover #534
Workflow file for this run
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: CI | |
| on: | |
| push: | |
| branches: [main, develop] | |
| pull_request: | |
| branches: [main, develop] | |
| # Cancel in-progress runs for the same workflow and branch | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # Job 1: Code quality checks (fast feedback) | |
| quality: | |
| name: Code Quality | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24.11.1 | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Run ESLint | |
| run: pnpm lint | |
| - name: Check code formatting | |
| run: pnpm format:check | |
| # Job 2: Unit tests with coverage | |
| # Node 24.x matches package.json engines and the Quality / Build jobs (tests failed on 20.x + Vitest forks). | |
| test: | |
| name: Unit Tests | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write # lcov-reporter-action comments on PRs | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24.11.1 | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Run tests with coverage | |
| run: pnpm test:coverage | |
| env: | |
| NODE_OPTIONS: --max-old-space-size=4096 | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: ./coverage/coverage-final.json | |
| flags: unittests | |
| name: codecov-umbrella | |
| fail_ci_if_error: false | |
| verbose: true | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| continue-on-error: true | |
| - name: Comment coverage on PR | |
| if: github.event_name == 'pull_request' | |
| uses: romeovs/lcov-reporter-action@v0.4.0 | |
| with: | |
| lcov-file: ./coverage/lcov.info | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| delete-old-comments: true | |
| continue-on-error: true | |
| # Job 3: Build verification | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| needs: [quality, test] # Only build if quality and tests pass | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24.11.1 | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build project | |
| run: pnpm build | |
| env: | |
| VITE_GIT_BRANCH: ${{ github.ref_name }} | |
| VITE_DEV_SITE_URL: 'https://dev.bayanflow.com' | |
| VITE_POSTHOG_API_KEY: ${{ secrets.VITE_POSTHOG_API_KEY }} | |
| VITE_POSTHOG_API_HOST: 'https://us.i.posthog.com' | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: dist | |
| path: dist/ | |
| retention-days: 7 | |
| # Job 4: All checks passed (optional but useful for branch protection) | |
| all-checks-pass: | |
| name: All Checks Passed | |
| runs-on: ubuntu-latest | |
| needs: [quality, test, build] | |
| if: always() | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Check if all jobs succeeded | |
| run: | | |
| if [[ "${{ needs.quality.result }}" != "success" || "${{ needs.test.result }}" != "success" || "${{ needs.build.result }}" != "success" ]]; then | |
| echo "One or more jobs failed" | |
| exit 1 | |
| fi | |
| echo "All checks passed successfully!" |