Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 18, 2025

Enables customization of lint and test npm script commands in the CI workflow, with automatic path correction for reports generated inside containers.

Changes

Configurable Commands

  • Lint action: Added command input (default: lint:ci)
  • Test action: Added command input (default: test:ci)
  • Workflow integration: Parse JSON options and pass commands to actions
# Usage example
with:
  lint: |
    {
      "command": "lint:ci",
      "report-file": "reports/eslint.json"
    }
  test: |
    {
      "command": "test:coverage",
      "coverage": "github",
      "coverage-files": "coverage/cobertura-coverage.xml"
    }

Container Path Rewriting

  • New action: rewrite-report-paths converts container paths (e.g., /app/src/file.js) to repository paths in report files
  • Auto-detection: Identifies common container roots (/app, /workspace, /usr/src/app)
  • Auto-integration: Workflow applies path rewriting after lint/test when container mode is enabled
  • Glob support: Processes multiple report files matching patterns

This ensures GitHub annotations and coverage reports correctly reference source files when running CI in containers.

Documentation

  • Updated action READMEs with new inputs and usage examples
  • Added workflow documentation explaining command configuration
  • Noted requirement for commands to generate expected report files
Original prompt

On continuous-integration.yml, we should allow configuring lint and test command.

By default it is lint:ci and test:ci.

We should documentent that both command should generated the expected file result

When running in container we must transform the rewrite paths in generated report files as there are to match with repository path. IMO a dedicated action will be good for this.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Allow configuration of lint and test commands in CI Add configurable lint/test commands and container path rewriting Nov 18, 2025
Copilot AI requested a review from neilime November 18, 2025 14:40
@neilime neilime changed the title Add configurable lint/test commands and container path rewriting feat(continuous-integration)!: add configurable lint/test commands and container path rewriting Nov 18, 2025
@neilime neilime marked this pull request as ready for review November 18, 2025 14:41
@github-actions
Copy link
Contributor

github-actions bot commented Nov 18, 2025

Code Coverage Report

Summary

Summary
Generated on: 11/19/2025 - 08:44:19
Parser: LCov
Assemblies: 1
Classes: 1
Files: 1
Line coverage: 100% (2 of 2)
Covered lines: 2
Uncovered lines: 0
Coverable lines: 2
Total lines: 5
Method coverage: Feature is only available for sponsors
Tag: 516_19495097742

Coverage

Default - 100%
Name Line
Default 100%
src/index.js 100%

@neilime neilime force-pushed the copilot/configure-lint-and-test-commands branch 12 times, most recently from 091f3a8 to a978f00 Compare November 20, 2025 16:55
@neilime neilime changed the title feat(continuous-integration)!: add configurable lint/test commands and container path rewriting feat(continuous-integration)!: add configurable lint/test commands and container better support Nov 20, 2025
@neilime neilime force-pushed the copilot/configure-lint-and-test-commands branch 7 times, most recently from 06edb9f to 2c424f2 Compare November 21, 2025 10:16
…d container better support

Co-authored-by: neilime <[email protected]>
Signed-off-by: Emilien Escalle <[email protected]>
@neilime neilime force-pushed the copilot/configure-lint-and-test-commands branch from 2c424f2 to 8ac9e16 Compare November 21, 2025 10:21
@neilime neilime merged commit 3c81a0a into main Nov 21, 2025
69 checks passed
@neilime neilime deleted the copilot/configure-lint-and-test-commands branch November 21, 2025 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants