name: ✅ Check on: push: branches: - main pull_request: types: - opened - reopened - synchronize - ready_for_review concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true permissions: contents: write checks: write jobs: lint: name: 🔬 ESLint runs-on: ubuntu-latest timeout-minutes: 10 if: ${{ !github.event.pull_request.draft || github.event_name == 'push' }} steps: - name: 📥 Checkout repo uses: actions/checkout@v4 - name: ⚙️ Setup node uses: actions/setup-node@v4 with: node-version: 22 cache: npm - name: 📥 Download deps run: npm ci - name: 🔬 Lint uses: wearerequired/lint-action@v2 with: eslint: true eslint_args: "**/*.{mjs,ts,tsx}" prettier: true prettier_args: "--config ./.prettierrc.json \"**/*.{js,json,ts,tsx,css,md,html}\"" typecheck: name: 🏷️ Typecheck timeout-minutes: 10 runs-on: ubuntu-latest if: ${{ !github.event.pull_request.draft || github.event_name == 'push' }} steps: - name: 📥 Checkout repo uses: actions/checkout@v4 - name: ⚙️ Setup node uses: actions/setup-node@v4 with: node-version: 22 cache: npm - name: 📥 Download deps run: npm ci - name: 🏷️ Typecheck run: npm run typecheck test-app: name: 🔎 Test runs-on: ubuntu-latest timeout-minutes: 10 if: ${{ !github.event.pull_request.draft || github.event_name == 'push' }} steps: - name: 📥 Checkout repo uses: actions/checkout@v4 - name: ⚙️ Setup node uses: actions/setup-node@v4 with: node-version: 22 cache: npm - name: 📥 Download deps run: npm ci - name: 🎭 Install Playwright browsers run: npx playwright install chromium-headless-shell 1>/dev/null - name: 🔎 Unit Tests on App run: CI=1 npm run test:unit:app -- --run - name: 🔎 Unit Tests on Supabase functions run: CI=1 npm run test:unit:functions -- --run e2e-test: timeout-minutes: 10 runs-on: ubuntu-latest steps: - name: 📥 Checkout repo uses: actions/checkout@v4 - name: ⚙️ Setup node uses: actions/setup-node@v4 with: node-version: 22 cache: npm - name: Install dependencies run: npm ci - name: Install Playwright Browsers run: npx playwright install --with-deps chromium-headless-shell 1>/dev/null - name: Install wait-on and serve run: npm install -g wait-on serve - name: Run Playwright tests run: make test-e2e-ci build: name: 🔨 Build timeout-minutes: 10 runs-on: ubuntu-latest if: ${{ !github.event.pull_request.draft || github.event_name == 'push' }} steps: - name: 📥 Checkout repo uses: actions/checkout@v4 - name: ⚙️ Setup node uses: actions/setup-node@v4 with: node-version: 22 cache: npm - name: 📥 Download deps run: npm ci - name: 🔨 Build run: npm run build