Manual Critical File Labelling

๐Ÿ“˜

No runtime dependency is required to use Manual Critical File Labelling

It is only necessary to update your codecov.yml (see below) to use Manual Critical File Labelling

Manual Critical Labels in the UI and PR Comments

In addition to using impact analysis to label files commonly executed in production as Critical, you can also manually specify those files you would like labelled. This is particularly helpful when:

  1. You have files that contain critical code but that code isn't necessarily executed often.
  2. You would like to designate files as critical but aren't ready to commit fully to using Impact Analysis
  3. You use a language that Impact Analysis currently does not support.

It is important to note that you do not to bring in any dependencies to use manual critical file labelling. You only have to provide the list of files you would like labelled in your codecov.yml. These files will then be labelled as Critical in the Codecov UI and in the Impact Files list on your PR Comments.

How to use Manual Critical File Labels

Simply update your codecov.yml in your repository by providing a list of files you would like to label as critical when they are changed:

comment: 
  show_critical_paths: true

profiling:
   critical_files_paths:
      - /path/to/file/my-file.py
      - /path/**/file.py
      - /src/important_directory/*

You can supply any of the following as an element of critical_files_paths:

  1. The fully qualified path to the file relative to the root of the repository.
  2. A path containing globs.
  3. A regular expression.

๐Ÿ“˜

Manual Critical File Labelling and Impact Analysis can be Used Together

If you wish to use Manual Critical File Labelling and Impact Analysis you can do so. Files you have specified to be labelled as critical and those that are executed often in production will both be labelled in the PR Comment and in the UI.