diff --git a/.github/workflows/test_push.yml b/.github/workflows/test_push.yml index 8be4c54..82645c6 100644 --- a/.github/workflows/test_push.yml +++ b/.github/workflows/test_push.yml @@ -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: diff --git a/ci/test_on_push.go b/ci/test_on_push.go index 3ea22a0..17edfd5 100644 --- a/ci/test_on_push.go +++ b/ci/test_on_push.go @@ -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) -} } \ No newline at end of file