Skip to content

Commit 9a072c0

Browse files
Copilotneilime
andcommitted
Add lint:ci script to test package.json
Co-authored-by: neilime <314088+neilime@users.noreply.github.com> Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
1 parent d6f25c0 commit 9a072c0

File tree

2 files changed

+2
-48
lines changed

2 files changed

+2
-48
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 1 addition & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,6 @@ on:
5656
Whether to enable linting.
5757
Set to `null` or empty to disable.
5858
Accepts a JSON object for lint options. See [lint action](../actions/lint/README.md).
59-
60-
Supported options:
61-
- `command`: NPM script to run (default: "lint:ci"). The command should generate lint report files.
62-
- `report-file`: Path to lint report file for annotations.
63-
64-
Example:
65-
```json
66-
{
67-
"command": "lint:ci",
68-
"report-file": "reports/eslint.json"
69-
}
70-
```
7159
type: string
7260
required: false
7361
default: "true"
@@ -86,20 +74,6 @@ on:
8674
Whether to enable testing.
8775
Set to `null` or empty to disable.
8876
Accepts a JSON object for test options. See [test action](../actions/test/README.md).
89-
90-
Supported options:
91-
- `command`: NPM script to run (default: "test:ci"). The command should generate coverage report files.
92-
- `coverage`: Coverage reporter ("github", "codecov", or "" for none).
93-
- `coverage-files`: Path to coverage files for reporting.
94-
95-
Example:
96-
```json
97-
{
98-
"command": "test:ci",
99-
"coverage": "github",
100-
"coverage-files": "coverage/cobertura-coverage.xml"
101-
}
102-
```
10377
type: string
10478
required: false
10579
default: "true"
@@ -285,6 +259,7 @@ jobs:
285259
credentials: ${{ fromJSON(needs.prepare.outputs.container-username && format('{{"username":{0},"password":{1}}}',toJSON(needs.prepare.outputs.container-username),toJSON(secrets.container-password)) || '{}') }}
286260
permissions:
287261
contents: read
262+
packages: read
288263
# FIXME: This is a workaround for having workflow ref. See https://github.com/orgs/community/discussions/38659
289264
id-token: write
290265
outputs:
@@ -453,17 +428,6 @@ jobs:
453428
command: ${{ steps.preparel-lint-options.outputs.command }}
454429
report-file: ${{ steps.preparel-lint-options.outputs.report-file }}
455430

456-
- name: 🔄 Rewrite lint report paths (container mode)
457-
if: always() && needs.prepare.outputs.container-image
458-
uses: ./self-workflow/actions/rewrite-report-paths
459-
with:
460-
working-directory: ${{ inputs.working-directory }}
461-
report-files: |
462-
**/*eslint*.json
463-
**/*checkstyle*.xml
464-
reports/**/*.json
465-
reports/**/*.xml
466-
467431
build:
468432
name: 🏗️ Build
469433
if: inputs.checks == true
@@ -583,14 +547,3 @@ jobs:
583547
coverage: ${{ steps.prepare-test-options.outputs.coverage }}
584548
coverage-files: ${{ steps.prepare-test-options.outputs.coverage-files }}
585549
github-token: ${{ github.token }}
586-
587-
- name: 🔄 Rewrite coverage report paths (container mode)
588-
if: always() && needs.prepare.outputs.container-image
589-
uses: ./self-workflow/actions/rewrite-report-paths
590-
with:
591-
working-directory: ${{ inputs.working-directory }}
592-
report-files: |
593-
coverage/**/*.xml
594-
coverage/**/*.info
595-
coverage/**/*.json
596-
test-results/**/*.xml

tests/npm/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"main": "src/index.js",
44
"scripts": {
55
"lint": "echo \"lint test\"",
6+
"lint:ci": "echo \"lint:ci test\"",
67
"build": "mkdir -p dist && echo \"build test\" > dist/test.txt",
78
"test:ci": "jest --coverage"
89
},

0 commit comments

Comments
 (0)