Vitest Coverage Report Action

screenshot of Vitest Coverage Report Action
vite

A GitHub Action to report vitest test coverage results

Overview

The vitest-coverage-report-action is an innovative GitHub Action designed to streamline the reporting of vitest coverage results directly on GitHub. By integrating coverage reports into both the step summary and pull requests, it enhances visibility into project test coverage at a glance. Whether you're aiming to identify gaps in testing or simply wish to keep your codebase healthy, this tool simplifies the process and allows for easy reference to uncovered lines in files.

With its effective reporting capabilities, contributors to any project can benefit greatly from the clear outlines provided by this action. It supports both high-level and detailed reports, ensuring that developers have access to all relevant information without unnecessary complexity.

Features

  • Step Summary Reporting: Automatically generates a high-level coverage summary along with a detailed file-based report that highlights uncovered lines.

  • Customizable Reporters: Supports configuration of two types of reporters: json-summary (required for high-level overview) and json (optional for detailed file-specific reports).

  • User-friendly Configuration: Easily integrated into existing projects by adjusting the Vite configuration file, facilitating quick setup and use.

  • Efficient Execution: Requires a simple command (npx vitest --coverage.enabled true) to be executed before running the action, streamlining the workflow.

  • Pull Request Comments: Automatically adds comments on pull requests with coverage results when the necessary permissions are granted, enhancing collaboration and transparency among team members.

  • Flexible Working Directory: Allows customization of the main path to search for configuration and coverage files, adapting to various project structures.

  • Permission Management: Requires specific permissions for effective functioning, ensuring that coverage reports are correctly generated and displayed, especially for new repositories.

  • Contributing Guidelines: Encourages community involvement by providing clear guidelines for those looking to enhance the action further, promoting an open-source culture.

vite
Vite

Vite is a build tool that aims to provide a faster and leaner development experience for modern web projects

typescript
Typescript

TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.