name: CI on: pull_request: paths-ignore: - '**/*.md' - 'LICENSE' - '.editorconfig' - '.gitattributes' - '.gitignore' - '.prettierignore' - '.prettierrc' - 'codecov.yml' push: branches: - main paths-ignore: - '**/*.md' - 'LICENSE' - '.editorconfig' - '.gitattributes' - '.gitignore' - '.prettierignore' - '.prettierrc' - 'codecov.yml' merge_group: workflow_dispatch: permissions: contents: read id-token: write concurrency: group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true env: BUN_VERSION: 1.3.11 NODE_VERSION: 22 jobs: quality: runs-on: ubuntu-latest timeout-minutes: 20 steps: - name: Check out repository uses: actions/checkout@v7 - name: Set up Node uses: actions/setup-node@v7 with: node-version: ${{ env.NODE_VERSION }} - name: Set up Bun uses: oven-sh/setup-bun@v2 with: bun-version: ${{ env.BUN_VERSION }} - name: Install dependencies run: bun install --frozen-lockfile - name: Check formatting run: bun run format:check - name: Check TypeScript run: bun run check - name: Check generated Wrangler types run: bunx wrangler types --check - name: Run tests with coverage run: bun run test:coverage - name: Upload coverage to Codecov if: github.event_name == 'push' && github.ref == 'refs/heads/main' uses: codecov/codecov-action@v7 with: files: ./coverage/lcov.info fail_ci_if_error: true use_oidc: true deploy-dry-run: needs: - quality runs-on: ubuntu-latest timeout-minutes: 15 steps: - name: Check out repository uses: actions/checkout@v7 - name: Set up Node uses: actions/setup-node@v7 with: node-version: ${{ env.NODE_VERSION }} - name: Set up Bun uses: oven-sh/setup-bun@v2 with: bun-version: ${{ env.BUN_VERSION }} - name: Install dependencies run: bun install --frozen-lockfile - name: Build deployment bundle without publishing run: bunx wrangler deploy --dry-run --keep-vars --message "CI dry run for ${GITHUB_SHA}"