Skip to content

feat: Add CI for Deno tests and refactor task-management function#27

Merged
nannany merged 2 commits intomainfrom
feat/deno-test-ci
May 27, 2025
Merged

feat: Add CI for Deno tests and refactor task-management function#27
nannany merged 2 commits intomainfrom
feat/deno-test-ci

Conversation

@nannany
Copy link
Copy Markdown
Owner

@nannany nannany commented May 27, 2025

Refactored supabase/functions/task-management/index.ts to allow the createToken function to be exported and used directly in tests.

  • Moved createToken to the top-level scope.
  • Exported createToken.

Updated supabase/functions/task-management/index.test.ts:

  • Removed the local createTokenForTest definition.
  • Imported and used the createToken function from index.ts. This change helps prevent TS2322 type errors by ensuring the test uses the actual function implementation.

Added a GitHub Actions workflow (.github/workflows/deno-test.yml) to automate Deno testing for functions under supabase/functions/.

  • The workflow triggers on pushes and pull requests to the main branch affecting files in supabase/functions/.
  • It checks out the code, sets up Deno, and runs deno test with necessary permissions.

Refactored `supabase/functions/task-management/index.ts` to allow the `createToken` function to be exported and used directly in tests.
- Moved `createToken` to the top-level scope.
- Exported `createToken`.

Updated `supabase/functions/task-management/index.test.ts`:
- Removed the local `createTokenForTest` definition.
- Imported and used the `createToken` function from `index.ts`.
This change helps prevent TS2322 type errors by ensuring the test uses the actual function implementation.

Added a GitHub Actions workflow (`.github/workflows/deno-test.yml`) to automate Deno testing for functions under `supabase/functions/`.
- The workflow triggers on pushes and pull requests to the main branch affecting files in `supabase/functions/`.
- It checks out the code, sets up Deno, and runs `deno test` with necessary permissions.
@vercel
Copy link
Copy Markdown

vercel bot commented May 27, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tryjunie ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 27, 2025 8:19am

…n permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@nannany nannany merged commit 7d8979f into main May 27, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants