Closed zabawaba99 closed 8 years ago
We'll need to update the documentation but if you'd like I'll do that after we merge this
I also wanted to add some tests to it. What do you think about the overall implementation?
I also wanted to add some tests to it. What do you think about the overall implementation?
Looks good, nothing that jumps out at me. I'm going to clone it and test out it a bit.
Did some manual testing and it looks good on my end. Going to start unit testing between tonight and tomorrow morning and push a new commit.
Latests changes:
.snag.yml
verbose: true
ignore:
- .git
- snag
- snag.exe
build:
- go build
- go vet
- gofmt -l -s .
- go test . ./vow -test.short
run:
- go run test/binary1/main.go
- go run test/binary2/main.go
- go run test/binary3/main.go
test/binary1/main.go
package main
import (
"fmt"
"time"
)
func main() {
for i := 0; i < 10; i++ {
fmt.Printf("Sleep count %d\n", i)
time.Sleep(time.Second)
}
}
test/binary2/main.go
package main
import (
"fmt"
"os"
"time"
)
func main() {
for i := 8; i > 0; i-- {
fmt.Printf("Failing in %d\n", i)
time.Sleep(time.Second)
}
os.Exit(1)
}
test/binary3/main.go
package main
import (
"fmt"
"time"
)
func main() {
var count int
for range time.Tick(5 * time.Second) {
count++
fmt.Printf("Ticked count %d\n", count)
}
}
Result:
Looks good, I'm going to merge this and we can iterate over it on master
Closes #48
The snag.yml now accepts a 'Runners' tag. This tag represents a group of commands that are meant to be run in parallel after the build stage.
Each process will be given a chance to start and will then get backgrounded to allow other processes to run. The output of each command is streamed to stdout prefix with the pid of the logging command