ci: apparently dagger cannot generate a coverage report lol

This commit is contained in:
Slug-Boi
2025-04-10 13:26:32 +02:00
parent 7c2f67e39b
commit 6153ab95e6
2 changed files with 3 additions and 11 deletions
+1 -10
View File
@@ -35,19 +35,10 @@ func main() {
WithExec([]string{"go", "mod", "tidy"}).WithEnvVariable("CI", "true")
// run application tests
out, err := runner.WithWorkdir("/src_d/src").WithExec([]string{"go", "test", "./cmd/utils", "./cmd/tui", "-coverprofile=cover.out"}).
out, err := runner.WithWorkdir("/src_d/src").WithExec([]string{"go", "test", "./..."}).
Stderr(ctx)
if err != nil {
panic(err)
}
fmt.Println(out)
out, err = runner.WithExec([]string{"find", "/", "-name", "cover.out"}).Stdout(ctx)
fmt.Println(out)
// export the coverage report
_, err = runner.WithWorkdir("/").File("/src_d/src/cover.out").Export(ctx, "./cover.out")
if err != nil {
panic(err)
}
}