Commit 7857035
committed
feat: Add CI for Deno tests and refactor task-management function
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.1 parent 0a82448 commit 7857035
File tree
3 files changed
+63
-61
lines changed- .github/workflows
- supabase/functions/task-management
3 files changed
+63
-61
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | 12 | | |
41 | 13 | | |
42 | 14 | | |
| |||
68 | 40 | | |
69 | 41 | | |
70 | 42 | | |
71 | | - | |
| 43 | + | |
72 | 44 | | |
73 | 45 | | |
74 | 46 | | |
| |||
160 | 132 | | |
161 | 133 | | |
162 | 134 | | |
163 | | - | |
| 135 | + | |
164 | 136 | | |
165 | | - | |
| 137 | + | |
166 | 138 | | |
167 | 139 | | |
168 | 140 | | |
169 | 141 | | |
170 | 142 | | |
171 | 143 | | |
172 | | - | |
| 144 | + | |
173 | 145 | | |
174 | 146 | | |
175 | 147 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
61 | 88 | | |
62 | 89 | | |
63 | 90 | | |
| |||
185 | 212 | | |
186 | 213 | | |
187 | 214 | | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
218 | | - | |
| 218 | + | |
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
| |||
0 commit comments