feat: Add CI for Deno tests and refactor task-management function#27
Merged
feat: Add CI for Deno tests and refactor task-management function#27
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
…n permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactored
supabase/functions/task-management/index.tsto allow thecreateTokenfunction to be exported and used directly in tests.createTokento the top-level scope.createToken.Updated
supabase/functions/task-management/index.test.ts:createTokenForTestdefinition.createTokenfunction fromindex.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 undersupabase/functions/.supabase/functions/.deno testwith necessary permissions.