feat(phases): add override + set_ratings table #378
Workflow file for this run
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: Unit Tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| name: Run Unit Tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| env: | |
| VITE_SUPABASE_URL: http://127.0.0.1:54321 | |
| VITE_SUPABASE_PUBLISHABLE_KEY: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: ".nvmrc" | |
| cache: "pnpm" | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Run unit tests | |
| run: pnpm test | |
| - name: Run unit tests with coverage | |
| run: pnpm run test:coverage | |
| if: github.event_name == 'pull_request' | |
| - name: Upload coverage reports | |
| uses: actions/upload-artifact@v4 | |
| if: github.event_name == 'pull_request' | |
| with: | |
| name: coverage-report | |
| path: coverage/ | |
| retention-days: 7 | |
| deno-test: | |
| name: Run Edge Function Tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: denoland/setup-deno@v1 | |
| with: | |
| deno-version: v2.x | |
| - name: Run Deno tests for Edge Functions | |
| run: | | |
| set -e | |
| for fn in supabase/functions/*/; do | |
| if compgen -G "$fn"*.test.ts > /dev/null; then | |
| echo "::group::deno test $fn" | |
| (cd "$fn" && deno test --allow-env --allow-net --allow-read) | |
| echo "::endgroup::" | |
| fi | |
| done |