From ea3debdc7ec3b1450bcdf9e841a88c72152289cd Mon Sep 17 00:00:00 2001 From: Tsiry Sandratraina Date: Thu, 29 Aug 2024 08:23:49 +0000 Subject: [PATCH] add fluentci.toml --- .fluentci/fluentci.toml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .fluentci/fluentci.toml diff --git a/.fluentci/fluentci.toml b/.fluentci/fluentci.toml new file mode 100644 index 0000000..335bf78 --- /dev/null +++ b/.fluentci/fluentci.toml @@ -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\"", +]