Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/branch-protection-sentinel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
name: Verify push to main is from PR merge
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v4
with:
fetch-depth: 2

Expand Down
58 changes: 29 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
timeout-minutes: 3

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v4
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep checkout credentials out of the worktree

This workflow runs on pull_request and then executes repository-controlled scripts, but downgrading to checkout@v4 restores the default behavior of persisting the Actions token in local git config; GitHub's checkout v6 README says v6 stores credentials under $RUNNER_TEMP instead of .git/config, while v4 documents that the auth token is persisted in local git config. A PR that changes an early script such as scripts/smoke-tests.mjs or an npm lifecycle/test script can read that config before post-job cleanup, so use checkout@v6 on ubuntu-latest or set persist-credentials: false where authenticated git is not needed.

Useful? React with 👍 / 👎.


- uses: actions/setup-node@v6
- uses: actions/setup-node@v4
with:
node-version: 20

Expand All @@ -37,12 +37,12 @@ jobs:
name: Lint, Typecheck & Test
runs-on: ubuntu-latest
needs: smoke
timeout-minutes: 45
timeout-minutes: 75

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v4

- uses: actions/setup-node@v6
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
Expand Down Expand Up @@ -163,8 +163,8 @@ jobs:
runs-on: ubuntu-latest
needs: quality
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
Expand All @@ -179,7 +179,7 @@ jobs:
run: |
npx vitest run --coverage --coverage.reporter=json --coverage.reporter=html
- name: Upload Coverage Artifacts
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@v4
with:
name: full-coverage-report
path: coverage/
Expand All @@ -190,8 +190,8 @@ jobs:
runs-on: ubuntu-latest
needs: quality
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
Expand All @@ -203,7 +203,7 @@ jobs:
run: npm run test:e2e:critical
- name: Upload E2E Report
if: always()
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@v4
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Make artifact uploads rerun-safe

When this job fails in Run Critical E2E, the if: always() artifact step still creates playwright-report; rerunning failed jobs then tries to upload the same artifact name in the same workflow run, and upload-artifact@v4 rejects duplicate artifact names unless overwrite: true is set or the name is made unique (the v4 README documents that same-named uploads now fail: https://github.com/actions/upload-artifact/tree/v4#not-uploading-to-the-same-artifact). This can make a rerun stay red even after the tests pass; the same pattern exists in the E2E workflow's static artifact names.

Useful? React with 👍 / 👎.

with:
name: playwright-report
path: playwright-report/
Expand All @@ -217,9 +217,9 @@ jobs:
timeout-minutes: 10

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v4

- uses: actions/setup-node@v6
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
Expand Down Expand Up @@ -262,7 +262,7 @@ jobs:

- name: Upload ref-warning console snapshot
if: always()
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@v4
with:
name: console-snapshot-ref-${{ github.run_id }}
path: |
Expand All @@ -277,9 +277,9 @@ jobs:
timeout-minutes: 10

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v4

- uses: actions/setup-node@v6
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
Expand Down Expand Up @@ -317,7 +317,7 @@ jobs:

- name: Upload hook coverage artifact
if: always()
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@v4
with:
name: hooks-coverage
path: coverage/
Expand All @@ -330,9 +330,9 @@ jobs:
timeout-minutes: 10

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v4

- uses: actions/setup-node@v6
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
Expand Down Expand Up @@ -371,7 +371,7 @@ jobs:

- name: Upload price-freshness coverage artifact
if: always()
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@v4
with:
name: price-freshness-coverage
path: coverage/
Expand All @@ -384,9 +384,9 @@ jobs:
timeout-minutes: 10

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v4

- uses: actions/setup-node@v6
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
Expand All @@ -399,7 +399,7 @@ jobs:

- name: Upload cloud-status coverage artifact
if: always()
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@v4
with:
name: cloud-status-coverage
path: coverage/
Expand All @@ -412,14 +412,14 @@ jobs:
timeout-minutes: 15

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v4

- uses: actions/setup-node@v6
- uses: actions/setup-node@v4
with:
node-version: 20

- name: Setup Deno
uses: denoland/setup-deno@v2
uses: denoland/setup-deno@v1
with:
deno-version: v2.x

Expand All @@ -436,9 +436,9 @@ jobs:
timeout-minutes: 20

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v4

- uses: actions/setup-node@v6
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
Expand All @@ -454,7 +454,7 @@ jobs:

- name: Upload Theme Validation Report
if: always()
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@v4
with:
name: theme-validation-report
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-edge-functions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
functions: ${{ steps.detect.outputs.functions }}
count: ${{ steps.detect.outputs.count }}
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v4

- name: Detect edge functions
id: detect
Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:
matrix:
fn: ${{ fromJSON(needs.list-functions.outputs.functions) }}
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v4

- name: Setup Supabase CLI
uses: supabase/setup-cli@v2
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ jobs:
E2E_ADMIN_EMAIL: ${{ secrets.E2E_ADMIN_EMAIL }}
E2E_ADMIN_PASSWORD: ${{ secrets.E2E_ADMIN_PASSWORD }}
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v4

- uses: actions/setup-node@v6
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
Expand Down Expand Up @@ -191,15 +191,15 @@ jobs:

- name: Upload Playwright report
if: always()
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: playwright-report
retention-days: 7

- name: Upload smoke summary (markdown + json)
if: always()
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@v4
with:
name: e2e-smoke-summary
path: |
Expand All @@ -210,7 +210,7 @@ jobs:

- name: Upload feature summary (markdown)
if: always()
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@v4
with:
name: e2e-feature-summary
path: playwright-report/feature-summary.md
Expand All @@ -219,7 +219,7 @@ jobs:

- name: Upload evidence artifacts
if: always()
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@v4
with:
name: e2e-evidence
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
21 changes: 13 additions & 8 deletions supabase/migrations/20250103_01_remove_gamification.sql
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,24 @@ DROP TABLE IF EXISTS public.user_points CASCADE;
-- REMOVER FEATURE FLAG DE GAMIFICAÇÃO (SE EXISTIR)
-- ============================================================

DELETE FROM public.feature_flags
WHERE flag_name = 'enable_gamification';
DO $$ BEGIN
DELETE FROM public.feature_flags WHERE flag_name = 'enable_gamification';
EXCEPTION WHEN undefined_table THEN NULL;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Fix the next fresh-migration failure too

For a fresh preview database where feature_flags has not been created yet, swallowing undefined_table here only moves the failure to the next migration: 20250103_02_rls_organizations.sql still unconditionally runs ALTER TABLE public.feature_flags/public.system_settings at lines 104-105, while those tables are created later in 20250103_complete_schema.sql at lines 849 and 861. This means the stated preview/fresh-DB migration fix still aborts immediately after this file unless the later RLS migration is guarded or reordered as well.

Useful? React with 👍 / 👎.

END $$;
Comment on lines +25 to +28

-- ============================================================
-- REMOVER CONFIGURAÇÕES DE PONTOS (SE EXISTIREM)
-- ============================================================

DELETE FROM public.system_settings
WHERE setting_key IN (
'points_per_sale',
'points_per_quote',
'points_per_mockup'
);
DO $$ BEGIN
DELETE FROM public.system_settings
WHERE setting_key IN (
'points_per_sale',
'points_per_quote',
'points_per_mockup'
);
EXCEPTION WHEN undefined_table THEN NULL;
Comment on lines +34 to +41
END $$;

-- ============================================================
-- VERIFICAÇÃO
Expand Down
Loading