Skip to content

Commit 2bcd2e7

Browse files
committed
Add Makefile.
1 parent e81500a commit 2bcd2e7

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

Makefile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
.PHONY: build test
2+
3+
build:
4+
go mod tidy
5+
go fmt ./...
6+
go vet ./...
7+
ifneq (, $(shell which staticcheck))
8+
staticcheck ./...
9+
else
10+
@echo "Skipping 'staticcheck'... Install using (go install honnef.co/go/tools/cmd/staticcheck@latest)"
11+
endif
12+
go build ./...
13+
14+
test:
15+
ifeq (, $(shell which gotestsum))
16+
go test ./...
17+
else
18+
gotestsum
19+
endif
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { serve } from "@upstash/workflow/nextjs";
2+
3+
export const { POST } = serve(
4+
async (context) => {
5+
await context.run("step-1", async () => {
6+
console.log("step-1");
7+
return "step-1-output";
8+
});
9+
10+
await context.run("step-2", async () => {
11+
console.log("step-2");
12+
return "step-2-output";
13+
});
14+
15+
await context.run("step-3", () => {
16+
console.log("step-3");
17+
return "step-3-output";
18+
});
19+
}, {
20+
verbose: true
21+
}
22+
);

0 commit comments

Comments
 (0)