Skip to content

Commit 7251c39

Browse files
committed
adds github CI && fixes some build errors
1 parent eb113c8 commit 7251c39

3 files changed

Lines changed: 39 additions & 9 deletions

File tree

.github/workflows/ci.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
lint-typecheck-test:
13+
name: Lint, typecheck and test
14+
runs-on: ubuntu-latest
15+
timeout-minutes: 8
16+
17+
steps:
18+
- name: Checkout default branch
19+
uses: actions/checkout@v4
20+
21+
- name: Use Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version-file: '.nvmrc'
25+
cache: 'npm'
26+
27+
- name: Install dependencies
28+
run: npm ci
29+
30+
- name: Build code
31+
run: npm run build

src/app/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ export default function Home() {
99
const trpc = useTRPC();
1010
const queryClient = useQueryClient();
1111

12-
const { data } = useQuery(trpc.workflows.findMany.queryOptions());
12+
const { data } = useQuery(trpc.workflows.findMany.queryOptions({}));
1313

1414
const createWorkflow = useMutation(
1515
trpc.workflows.createOne.mutationOptions({
1616
onSuccess: () => {
17-
queryClient.invalidateQueries(trpc.workflows.findMany.queryOptions());
17+
queryClient.invalidateQueries(trpc.workflows.findMany.queryOptions({}));
1818
},
1919
}),
2020
);

src/inngest/functions.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import prisma from "@/lib/prisma";
21
import { inngest } from "./client";
32
import { createGoogleGenerativeAI } from "@ai-sdk/google";
43
import { generateText } from "ai";
@@ -8,17 +7,17 @@ const google = createGoogleGenerativeAI();
87
export const createWorkflow = inngest.createFunction(
98
{ id: "create-workflow" },
109
{ event: "test/create.workflow" },
11-
async ({ event, step }) => {
10+
async ({ step }) => {
1211
await step.sleep("do stuff 1", "1s");
1312
await step.sleep("do stuff 2", "1s");
1413
await step.sleep("do stuff 3", "1s");
1514

1615
return await step.run("create workflow", async () => {
17-
return await prisma.workflow.create({
18-
data: {
19-
name: event.data.email,
20-
},
21-
});
16+
// return await prisma.workflow.create({
17+
// data: {
18+
// name: event.data.email,
19+
// },
20+
// });
2221
});
2322
},
2423
);

0 commit comments

Comments
 (0)