Skip to content

Latest commit

 

History

History
135 lines (101 loc) · 6.13 KB

File metadata and controls

135 lines (101 loc) · 6.13 KB

Icon GitHub Action: Test

Test

Marketplace Release License Stars PRs Welcome

Overview

Action to test Node.js projects with support for coverage reporting and pull request annotations

Usage

- 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: ""

Inputs

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.

Contributing

Contributions are welcome! Please see the contributing guidelines for more details.

License

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.