-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
[[steps]] | ||
name = "Setup go" | ||
command = ["fluentci run --wasm pkgx install go"] | ||
|
||
[[steps]] | ||
name = "go get & build" | ||
command = ["go get", "go build -o ./bin/main"] | ||
|
||
[[steps]] | ||
name = "Check code style" | ||
command = ["gofmt main.go | diff --ignore-tab-expansion main.go -"] | ||
|
||
[[steps]] | ||
name = "Run tests" | ||
command = [ | ||
"fluentci run --wasm postgres start", | ||
"go install gotest.tools/gotestsum@latest", | ||
"PATH=$HOME/go/bin:$PATH gotestsum --junitfile junit.xml ./...", | ||
] | ||
env = ["POSTGRES_USER=postgres", "POSTGRES_DB=s2"] | ||
|
||
[[steps]] | ||
name = "Test web server" | ||
command = [ | ||
"./bin/main 8001 &", | ||
"curl --silent localhost:8001/time | grep \"The current time is\"", | ||
] |