bust/pkg/tasks/golang/test.go

23 lines
333 B
Go
Raw Normal View History

2022-10-30 18:13:57 +01:00
package golang
import (
"context"
"log"
"dagger.io/dagger"
)
func Test(ctx context.Context, container *dagger.Container) error {
log.Printf("testing: image")
c := container.Exec(dagger.ContainerExecOpts{
Args: []string{"go", "test", "./..."},
})
_, err := c.ExitCode(ctx)
if err != nil {
return err
}
return nil
}