Skip to content

Upgrade

Upgrade #10

Workflow file for this run

name: πŸ€– CI
concurrency:
group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
FLY_ORG: ${{ vars.FLY_ORG }}
FLY_REGION: ${{ vars.FLY_REGION }}
permissions:
actions: write
contents: read
# Required to put a comment into the pull-request
pull-requests: write
jobs:
lint:
name: ⬣ Biome lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: biomejs/setup-biome@v2
- run: biome ci . --reporter=github
typecheck:
needs: lint
name: πŸ”Ž Type check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version-file: "package.json"
cache: "pnpm"
- run: pnpm install --prefer-offline --frozen-lockfile
- run: pnpm run typecheck
vitest:
needs: typecheck
name: ⚑ Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version-file: "package.json"
cache: "pnpm"
- run: pnpm install --prefer-offline --frozen-lockfile
- run: pnpm run test:cov
- name: "Report Coverage"
# Only works if you set `reportOnFailure: true` in your vite config as specified above
if: always()
uses: davelosert/vitest-coverage-report-action@v2
deploy-preview:
name: "πŸš€ Deploy Preview"
needs: [lint, typecheck, vitest]
uses: forge42dev/workflows/.github/workflows/deploy-to-fly.yaml@monorepo-matrix
with:
github_environment: "pr-preview"
fly_app_name: f42-memory-game-pr-${{ github.event.number }}
fly_config_file_path: fly.staging.toml
secrets:
fly_api_token: ${{ secrets.FLY_API_TOKEN }}
fly_secrets: |
SUPABASE_URL=${{ secrets.SUPABASE_URL }}
SUPABASE_KEY=${{ secrets.SUPABASE_KEY }}
DATABASE_URL=${{ secrets.DATABASE_URL }}
DIRECT_URL=${{ secrets.DIRECT_URL }}
SESSION_SECRET=${{ secrets.SESSION_SECRET }}