mirror of
https://github.com/Slug-Boi/cocommit.git
synced 2026-05-13 12:45:47 +00:00
ci: apparently dagger cannot generate a coverage report lol
This commit is contained in:
@@ -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
@@ -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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user