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
+2 -1
View File
@@ -21,7 +21,8 @@ jobs:
run: cd ci && go get dagger.io/dagger@latest && cd ..
- name: Run Dagger Test Workflow
run: go run ci/test_on_push.go
- name: Generate Coverage Report
run: go test -coverprofile=cover.out ./src/cmd/utils ./src/cmd/tui
- name: Update coverage report
uses: ncruces/go-coverage-report@v0
with:
+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)
}
}