feat: improves UX, no longer just a carbon copy of github #28
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, master] | |
| pull_request: | |
| jobs: | |
| ci: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| - name: Install git-lfs | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y git-lfs | |
| git lfs install | |
| git config --global user.name "CI" | |
| git config --global user.email "ci@test.local" | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Typecheck | |
| run: pnpm typecheck | |
| - name: Lint | |
| run: pnpm lint | |
| - name: Build | |
| run: pnpm build | |
| - name: Start production server | |
| run: pnpm --filter @groffee/web start & | |
| env: | |
| PORT: "3000" | |
| - name: Wait for server | |
| run: npx wait-on http://localhost:3000 --timeout 30000 | |
| - name: Seed database | |
| run: pnpm seed && pnpm make-admin alice | |
| - name: Run Git LFS tests | |
| run: pnpm --filter @groffee/web test:lfs | |
| - name: Install Playwright browsers | |
| run: npx playwright install --with-deps chromium | |
| - name: Run E2E tests | |
| run: npx playwright test | |
| env: | |
| CI: "true" | |
| BASE_URL: "http://localhost:3000" | |
| - name: Upload screenshots | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: screenshots | |
| path: screenshots/ | |
| - name: Upload Playwright report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-report | |
| path: playwright-report/ | |
| - name: Stop server | |
| if: always() | |
| run: kill %1 || true |