bust/pkg/tasks/golang/test.go
2022-10-30 18:13:57 +01:00

23 lines
333 B
Go

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
}