Action to test Node.js projects with support for coverage reporting and pull request annotations
- uses: hoverkraft-tech/ci-github-nodejs/actions/test@ce2bb8274a37c1219be2bcae2a1b2528c2c72957 # 0.19.0
with:
# Working directory where test commands are executed.
# Can be absolute or relative to the repository root.
#
# Default: `.`
working-directory: .
# Whether running in container mode (skips checkout and node setup)
# Default: `false`
container: "false"
# Code coverage reporter to use. Supported values:
# - `github`: Use ReportGenerator for PR comments with coverage reports
# - `codecov`: Upload coverage to Codecov
# - `""` or `null`: No coverage reporting
#
# Default: `github`
coverage: github
# Path to coverage files for reporting.
# Supports multiple formats (Cobertura, OpenCover, lcov, etc.).
# Can be a single file or multiple files separated by semicolons.
# If not specified, auto-detection will be attempted for common paths:
# - coverage/cobertura-coverage.xml, coverage/coverage.xml
# - coverage/lcov.info
# - coverage/clover.xml
coverage-files: ""
# GitHub token for coverage PR comments.
# Required when coverage is set to `github`.
github-token: ""| Input | Description | Required | Default |
|---|---|---|---|
working-directory |
Working directory where test commands are executed. | false | . |
| Can be absolute or relative to the repository root. | |||
container |
Whether running in container mode (skips checkout and node setup) | false | false |
coverage |
Code coverage reporter to use. Supported values: | false | github |
- github: Use ReportGenerator for PR comments with coverage reports |
|||
- codecov: Upload coverage to Codecov |
|||
- "" or null: No coverage reporting |
|||
coverage-files |
Path to coverage files for reporting. | false | - |
| Supports multiple formats (Cobertura, OpenCover, lcov, etc.). | |||
| Can be a single file or multiple files separated by semicolons. | |||
| If not specified, auto-detection will be attempted for common paths: | |||
| - coverage/cobertura-coverage.xml, coverage/coverage.xml | |||
| - coverage/lcov.info | |||
| - coverage/clover.xml | |||
github-token |
GitHub token for coverage PR comments. | false | - |
Required when coverage is set to github. |
Contributions are welcome! Please see the contributing guidelines for more details.
This project is licensed under the MIT License.
SPDX-License-Identifier: MIT
Copyright © 2025 hoverkraft
For more details, see the license.
This documentation was automatically generated by CI Dokumentor.