-
Notifications
You must be signed in to change notification settings - Fork 0
Strategic migration plan: Base44 → Supabase, TypeScript adoption, SSO, CI/CD #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
2591026
34ba74f
e400ce9
7149fae
23c0b17
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,45 +1,245 @@ | ||||||||||||||||||||||||||||||
| name: CI - Pull Request Checks | ||||||||||||||||||||||||||||||
| name: CI/CD Pipeline | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| # Only run on pull requests targeting main branch | ||||||||||||||||||||||||||||||
| # Trigger on push to main/develop and all pull requests | ||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||
| push: | ||||||||||||||||||||||||||||||
| branches: [main, develop] | ||||||||||||||||||||||||||||||
| pull_request: | ||||||||||||||||||||||||||||||
| branches: [ main ] | ||||||||||||||||||||||||||||||
| branches: [main, develop] | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| # Cancel in-progress runs for same branch | ||||||||||||||||||||||||||||||
| concurrency: | ||||||||||||||||||||||||||||||
| group: ${{ github.workflow }}-${{ github.ref }} | ||||||||||||||||||||||||||||||
| cancel-in-progress: true | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||
| test: | ||||||||||||||||||||||||||||||
| name: Code Quality & Testing | ||||||||||||||||||||||||||||||
| # Code quality checks | ||||||||||||||||||||||||||||||
| quality: | ||||||||||||||||||||||||||||||
| name: Code Quality & Linting | ||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||
| # Checkout the repository code | ||||||||||||||||||||||||||||||
| - name: Checkout code | ||||||||||||||||||||||||||||||
| uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| # Setup Node.js environment with caching for faster installs | ||||||||||||||||||||||||||||||
| - name: Setup Node.js | ||||||||||||||||||||||||||||||
| uses: actions/setup-node@v4 | ||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||
| node-version: '20' | ||||||||||||||||||||||||||||||
| cache: 'npm' | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| # Install dependencies using npm ci (clean install) | ||||||||||||||||||||||||||||||
| # This ensures consistent dependency versions across CI runs | ||||||||||||||||||||||||||||||
| - name: Install dependencies | ||||||||||||||||||||||||||||||
| run: npm ci | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| # Run ESLint to check code quality and style | ||||||||||||||||||||||||||||||
| # This catches potential bugs and enforces coding standards | ||||||||||||||||||||||||||||||
| - name: Run linter | ||||||||||||||||||||||||||||||
| - name: Run ESLint | ||||||||||||||||||||||||||||||
| run: npm run lint | ||||||||||||||||||||||||||||||
| continue-on-error: true # Don't fail the build on linting warnings | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| # Run Vitest test suite | ||||||||||||||||||||||||||||||
| # Validates that all unit and integration tests pass | ||||||||||||||||||||||||||||||
| - name: Check for unused imports | ||||||||||||||||||||||||||||||
| run: npx eslint . --ext .js,.jsx --quiet | ||||||||||||||||||||||||||||||
| continue-on-error: true | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| # TypeScript type checking | ||||||||||||||||||||||||||||||
| typecheck: | ||||||||||||||||||||||||||||||
| name: TypeScript Type Check | ||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||
| - name: Checkout code | ||||||||||||||||||||||||||||||
| uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Setup Node.js | ||||||||||||||||||||||||||||||
| uses: actions/setup-node@v4 | ||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||
| node-version: '20' | ||||||||||||||||||||||||||||||
| cache: 'npm' | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Install dependencies | ||||||||||||||||||||||||||||||
| run: npm ci | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Type check | ||||||||||||||||||||||||||||||
| run: npm run typecheck || echo "Type checking skipped (migration in progress)" | ||||||||||||||||||||||||||||||
| continue-on-error: true | ||||||||||||||||||||||||||||||
|
Comment on lines
+59
to
+61
|
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| # Run tests | ||||||||||||||||||||||||||||||
| test: | ||||||||||||||||||||||||||||||
| name: Unit & Integration Tests | ||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||
| - name: Checkout code | ||||||||||||||||||||||||||||||
| uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Setup Node.js | ||||||||||||||||||||||||||||||
| uses: actions/setup-node@v4 | ||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||
| node-version: '20' | ||||||||||||||||||||||||||||||
| cache: 'npm' | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Install dependencies | ||||||||||||||||||||||||||||||
| run: npm ci | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Run tests | ||||||||||||||||||||||||||||||
| run: npm run test:run | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| # Check for high/critical security vulnerabilities | ||||||||||||||||||||||||||||||
| # Only fails on high or critical severity issues | ||||||||||||||||||||||||||||||
| - name: Security audit | ||||||||||||||||||||||||||||||
| - name: Generate coverage report | ||||||||||||||||||||||||||||||
| run: npm run test:coverage | ||||||||||||||||||||||||||||||
| continue-on-error: true | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Upload coverage to Codecov | ||||||||||||||||||||||||||||||
| uses: codecov/codecov-action@v3 | ||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||
| files: ./coverage/lcov.info | ||||||||||||||||||||||||||||||
| flags: unittests | ||||||||||||||||||||||||||||||
| name: codecov-interact | ||||||||||||||||||||||||||||||
| fail_ci_if_error: false | ||||||||||||||||||||||||||||||
| continue-on-error: true | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| # Security scanning | ||||||||||||||||||||||||||||||
| security: | ||||||||||||||||||||||||||||||
| name: Security Scan | ||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||
| - name: Checkout code | ||||||||||||||||||||||||||||||
| uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Setup Node.js | ||||||||||||||||||||||||||||||
| uses: actions/setup-node@v4 | ||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||
| node-version: '20' | ||||||||||||||||||||||||||||||
| cache: 'npm' | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Install dependencies | ||||||||||||||||||||||||||||||
| run: npm ci | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Run npm audit | ||||||||||||||||||||||||||||||
| run: npm audit --audit-level=high | ||||||||||||||||||||||||||||||
| continue-on-error: true # Don't fail on advisory issues | ||||||||||||||||||||||||||||||
| continue-on-error: true | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
| continue-on-error: true | |
| continue-on-error: ${{ !(github.ref == 'refs/heads/main' || github.base_ref == 'main') }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P1: Pinning trufflehog to @main is a supply-chain security risk — any commit to the main branch will run in your CI. Pin to a specific version tag (e.g., @v3.88.0) or commit SHA.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/ci.yml, line 120:
<comment>Pinning `trufflehog` to `@main` is a supply-chain security risk — any commit to the main branch will run in your CI. Pin to a specific version tag (e.g., `@v3.88.0`) or commit SHA.</comment>
<file context>
@@ -1,45 +1,245 @@
+ continue-on-error: true
+
+ - name: Check for secrets
+ uses: trufflesecurity/trufflehog@main
+ with:
+ path: ./
</file context>
| uses: trufflesecurity/trufflehog@main | |
| uses: trufflesecurity/trufflehog@v3.88.0 |
Copilot
AI
Feb 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using trufflesecurity/trufflehog@main is not pinned and can change unexpectedly, which is a supply-chain risk for CI. Pin this action to a tagged release or a commit SHA.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P0: actions/upload-artifact@v3 was deprecated on Jan 30, 2025 and will cause workflow failures. Upgrade to @v4. The same applies to actions/download-artifact@v3 used in the deploy jobs.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/ci.yml, line 159:
<comment>`actions/upload-artifact@v3` was deprecated on Jan 30, 2025 and will cause workflow failures. Upgrade to `@v4`. The same applies to `actions/download-artifact@v3` used in the deploy jobs.</comment>
<file context>
@@ -1,45 +1,245 @@
+ du -h dist/* | sort -hr | head -20
+
+ - name: Upload build artifacts
+ uses: actions/upload-artifact@v3
+ with:
+ name: dist-${{ github.sha }}
</file context>
| uses: actions/upload-artifact@v3 | |
| uses: actions/upload-artifact@v4 |
Copilot
AI
Feb 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both deploy steps use continue-on-error: true on the actual Vercel deployment, so the workflow can report success even if deployment fails. This is risky operationally (especially for production) and makes failures easy to miss. Remove continue-on-error for deployment steps (or gate it behind a manual override) so failed deploys fail the job.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: This step is unreachable. The parent job's if condition requires github.event_name == 'push', so the step condition github.event_name == 'pull_request' can never be true. If the intent is to comment on PRs for staging previews, this logic needs to be in a separate job triggered by pull_request events.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/ci.yml, line 197:
<comment>This step is unreachable. The parent job's `if` condition requires `github.event_name == 'push'`, so the step condition `github.event_name == 'pull_request'` can never be true. If the intent is to comment on PRs for staging previews, this logic needs to be in a separate job triggered by `pull_request` events.</comment>
<file context>
@@ -1,45 +1,245 @@
+ continue-on-error: true
+
+ - name: Comment on PR with deployment URL
+ if: github.event_name == 'pull_request'
+ uses: actions/github-script@v6
+ with:
</file context>
Copilot
AI
Feb 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The “Comment on PR with deployment URL” step can never run because deploy-staging only runs on push events (if: ... && github.event_name == 'push'), but this step requires a pull_request event. Either remove the step, or change the deployment strategy to run a preview deploy on PRs and then comment there.
| - name: Comment on PR with deployment URL | |
| if: github.event_name == 'pull_request' | |
| uses: actions/github-script@v6 | |
| with: | |
| script: | | |
| github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: '✅ Staging deployment complete!\n\nURL: ${{ steps.vercel-deploy.outputs.preview-url }}' | |
| }) | |
| continue-on-error: true | |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P1: Production deployment step should not have
continue-on-error: true. A failed production deploy will silently appear successful, undermining the manual approval gate. Remove this or replace with proper error handling/notifications.Prompt for AI agents