coverage

command
v0.0.0-...-d7993bf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

README

Overview

The code coverage tool has two major features:

  1. As a pre-submit tool, it runs code coverage on every single commit to Github and reports coverage changes back to the PR as a comment by a robot account. If made a required job on the repository, it can be used to block a PR from merging if coverage falls below a certain threshold.
  2. As a periodic running job, it outputs a Junit XML that can be read from other tools like TestGrid to get overall coverage metrics.

Design

See the design document.

Build and Release

In the /images/prow-tests directory, run make push_coverage_dev to build and upload a staging version, intended for testing and debugging. The staging version can be triggered on a PR through the comment /test pull-knative-serving-go-coverage-dev. Note that staging version can only be tested against the serving repository because the staging jobs only exist in the serving repository.

Validating the staging version
  • To run the pre-submit workflow, add the comment /test pull-knative-serving-go-coverage-dev to a PR.
  • To run the periodic workflow, (re)run a post-knative-serving-go-coverage-dev job.
  • The beta-prow-tests dashboard also has coverage running from prow-tests:beta

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package artifacts is responsible for generating and structuring artifacts directory Copyright 2019 The Knative Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
Package artifacts is responsible for generating and structuring artifacts directory Copyright 2019 The Knative Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
Package calc calculates coverage through summarizing and also stores all the coverage structs used by or produced by the process Copyright 2019 The Knative Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
Package calc calculates coverage through summarizing and also stores all the coverage structs used by or produced by the process Copyright 2019 The Knative Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
gcs
Package gcs stores functions that relates to GCS operations, without dependency on the package calc Copyright 2019 The Knative Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
Package gcs stores functions that relates to GCS operations, without dependency on the package calc Copyright 2019 The Knative Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
Package str provides helper functions shared by more than one other go files
Package str provides helper functions shared by more than one other go files
testTarget
presubmit
Package presubmit serves as the target for presubmit coverage test.
Package presubmit serves as the target for presubmit coverage test.
subPkg2
Package subPkg2 serves as the target for multi-package coverage test.
Package subPkg2 serves as the target for multi-package coverage test.
targetPkgs_postsubmit
Package postsubmitTarget serves as the target for postsubmit coverage test.
Package postsubmitTarget serves as the target for postsubmit coverage test.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL