-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Renamed validation pipeline to ci for cleaner namings on the gh ui
- Loading branch information
Showing
1 changed file
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
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 | ||
- run: echo "Type Checks are disabled ✅" | ||
|
||
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 }} |