Skip to content

Commit fcc57ee

Browse files
Copilotneilime
andcommitted
Fix linting issues in new actions
Co-authored-by: neilime <314088+neilime@users.noreply.github.com>
1 parent a276470 commit fcc57ee

File tree

8 files changed

+47
-49
lines changed

8 files changed

+47
-49
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818
]
1919
}
2020
}
21-
}
21+
}

.github/workflows/continuous-integration.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,6 @@ jobs:
277277
if [ -f .gitignore ]; then grep -q "self-workflow" .gitignore || echo "self-workflow" >> .gitignore; else echo "self-workflow" >> .gitignore; fi
278278
if [ -f .dockerignore ]; then grep -q "self-workflow" .dockerignore || echo "self-workflow" >> .dockerignore; else echo "self-workflow" >> .dockerignore; fi
279279
# jscpd:ignore-end
280-
281280
- uses: ./self-workflow/actions/lint
282281
with:
283282
working-directory: ${{ inputs.working-directory }}
@@ -320,7 +319,6 @@ jobs:
320319
if [ -f .gitignore ]; then grep -q "self-workflow" .gitignore || echo "self-workflow" >> .gitignore; else echo "self-workflow" >> .gitignore; fi
321320
if [ -f .dockerignore ]; then grep -q "self-workflow" .dockerignore || echo "self-workflow" >> .dockerignore; else echo "self-workflow" >> .dockerignore; fi
322321
# jscpd:ignore-end
323-
324322
- id: build
325323
if: needs.setup.outputs.build-commands
326324
uses: ./self-workflow/actions/build

actions/build/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,19 @@ Composite action to build Node.js projects with support for custom commands, env
4646
4747
## Inputs
4848
49-
| Name | Description | Required | Default |
50-
| --------------------- | -------------------------------------------------------------------------------- | -------- | ------- |
51-
| `working-directory` | Working directory where build commands are executed | No | `.` |
52-
| `build-commands` | List of build commands to execute (npm/pnpm/yarn script names), one per line | Yes | - |
53-
| `build-env` | JSON object of environment variables to set during the build | No | `{}` |
54-
| `build-secrets` | Multi-line string of secrets in env format (KEY=VALUE) | No | `""` |
55-
| `build-artifact` | JSON object specifying artifact upload configuration | No | `""` |
56-
| `container` | Whether running in container mode (skips checkout and node setup) | No | `false` |
49+
| Name | Description | Required | Default |
50+
| ------------------- | ---------------------------------------------------------------------------- | -------- | ------- |
51+
| `working-directory` | Working directory where build commands are executed | No | `.` |
52+
| `build-commands` | List of build commands to execute (npm/pnpm/Yarn script names), one per line | Yes | - |
53+
| `build-env` | JSON object of environment variables to set during the build | No | `{}` |
54+
| `build-secrets` | Multi-line string of secrets in env format (KEY=VALUE) | No | `""` |
55+
| `build-artifact` | JSON object specifying artifact upload configuration | No | `""` |
56+
| `container` | Whether running in container mode (skips checkout and node setup) | No | `false` |
5757

5858
## Outputs
5959

60-
| Name | Description |
61-
| ------------- | ------------------------------------------------------ |
60+
| Name | Description |
61+
| ------------- | ------------------------------------------------------- |
6262
| `artifact-id` | ID of the uploaded artifact (if artifact was specified) |
6363

6464
## Examples

actions/build/action.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ runs:
7878
BUILD_SECRETS: ${{ inputs.build-secrets }}
7979
run: |
8080
set -e
81-
81+
8282
# Export build environment variables
8383
BUILD_ENV_JSON="${BUILD_ENV:-"{}"}"
84-
84+
8585
# Parse and export build env variables
8686
if [ "$BUILD_ENV_JSON" != "{}" ]; then
8787
echo "$BUILD_ENV_JSON" | jq -r 'to_entries[] | "\(.key)=\(.value)"' | while IFS= read -r line; do
@@ -90,7 +90,7 @@ runs:
9090
fi
9191
done
9292
fi
93-
93+
9494
# Export build secrets
9595
if [ -n "$BUILD_SECRETS" ]; then
9696
echo "$BUILD_SECRETS" | while IFS= read -r line; do
@@ -108,7 +108,7 @@ runs:
108108
RUN_SCRIPT_COMMAND: ${{ inputs.container == 'true' && steps.get-package-manager.outputs.run-script-command || steps.setup-node.outputs.run-script-command }}
109109
run: |
110110
set -e
111-
111+
112112
echo "$BUILD_COMMANDS" | while IFS= read -r COMMAND ; do
113113
# Trim whitespace
114114
COMMAND=$(echo "$COMMAND" | xargs)

actions/lint/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ Composite action to lint Node.js projects with support for pull request reportin
3434
3535
## Inputs
3636
37-
| Name | Description | Required | Default |
38-
| --------------------- | -------------------------------------------------------------------------------- | -------- | ------- |
39-
| `working-directory` | Working directory where lint commands are executed | No | `.` |
40-
| `container` | Whether running in container mode (skips checkout and node setup) | No | `false` |
41-
| `report-file` | Path to lint report file to process as GitHub annotations | No | `""` |
42-
| `fail-on-error` | Whether to fail the action if linting errors are found | No | `true` |
37+
| Name | Description | Required | Default |
38+
| ------------------- | ----------------------------------------------------------------- | -------- | ------- |
39+
| `working-directory` | Working directory where lint commands are executed | No | `.` |
40+
| `container` | Whether running in container mode (skips checkout and node setup) | No | `false` |
41+
| `report-file` | Path to lint report file to process as GitHub annotations | No | `""` |
42+
| `fail-on-error` | Whether to fail the action if linting errors are found | No | `true` |
4343

4444
## Supported Report Formats
4545

actions/lint/action.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,17 @@ runs:
5858
FAIL_ON_ERROR: ${{ inputs.fail-on-error }}
5959
run: |
6060
set +e # Don't exit on error, we want to process the report
61-
61+
6262
echo "👕 Running lint..."
6363
$RUN_SCRIPT_COMMAND lint
6464
LINT_EXIT_CODE=$?
65-
65+
6666
echo "lint-exit-code=$LINT_EXIT_CODE" >> $GITHUB_OUTPUT
67-
67+
6868
if [ "$FAIL_ON_ERROR" = "true" ] && [ $LINT_EXIT_CODE -ne 0 ]; then
6969
echo "::error::Linting failed with exit code $LINT_EXIT_CODE"
7070
fi
71-
71+
7272
# Always exit successfully here; we'll handle the failure later if needed
7373
exit 0
7474
@@ -79,14 +79,14 @@ runs:
7979
REPORT_FILE: ${{ inputs.report-file }}
8080
run: |
8181
set -e
82-
82+
8383
if [ ! -f "$REPORT_FILE" ]; then
8484
echo "::warning::Lint report file not found: $REPORT_FILE"
8585
exit 0
8686
fi
87-
87+
8888
echo "📊 Processing lint report: $REPORT_FILE"
89-
89+
9090
# Detect report format and process accordingly
9191
if echo "$REPORT_FILE" | grep -q "\.json$"; then
9292
echo "Detected JSON format"

actions/test/README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,20 @@ Composite action to test Node.js projects with support for coverage reporting, p
4242
4343
## Inputs
4444
45-
| Name | Description | Required | Default |
46-
| --------------------- | -------------------------------------------------------------------------------- | -------- | -------------------- |
47-
| `working-directory` | Working directory where test commands are executed | No | `.` |
48-
| `container` | Whether running in container mode (skips checkout and node setup) | No | `false` |
49-
| `coverage` | Code coverage reporter: "codecov", "lcov", or "" | No | `""` |
50-
| `lcov-file` | Path to LCOV file for coverage reporting (used with "lcov" coverage) | No | `coverage/lcov.info` |
51-
| `codecov-token` | Codecov token for private repositories | No | `""` |
52-
| `fail-on-error` | Whether to fail the action if tests fail | No | `true` |
45+
| Name | Description | Required | Default |
46+
| ------------------- | -------------------------------------------------------------------- | -------- | -------------------- |
47+
| `working-directory` | Working directory where test commands are executed | No | `.` |
48+
| `container` | Whether running in container mode (skips checkout and node setup) | No | `false` |
49+
| `coverage` | Code coverage reporter: "Codecov", "lcov", or "" | No | `""` |
50+
| `lcov-file` | Path to LCOV file for coverage reporting (used with "lcov" coverage) | No | `coverage/lcov.info` |
51+
| `codecov-token` | Codecov token for private repositories | No | `""` |
52+
| `fail-on-error` | Whether to fail the action if tests fail | No | `true` |
5353

5454
## Outputs
5555

56-
| Name | Description |
57-
| ----------------- | ---------------------------- |
58-
| `test-exit-code` | Exit code from the test run |
56+
| Name | Description |
57+
| ---------------- | --------------------------- |
58+
| `test-exit-code` | Exit code from the test run |
5959

6060
## Coverage Reporters
6161

@@ -158,10 +158,10 @@ For LCOV coverage, ensure your test framework generates an LCOV file:
158158
export default defineConfig({
159159
test: {
160160
coverage: {
161-
reporter: ['lcov', 'text']
162-
}
163-
}
164-
})
161+
reporter: ["lcov", "text"],
162+
},
163+
},
164+
});
165165
```
166166

167167
## Notes

actions/test/action.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,17 +77,17 @@ runs:
7777
FAIL_ON_ERROR: ${{ inputs.fail-on-error }}
7878
run: |
7979
set +e # Don't exit on error, we want to process coverage
80-
80+
8181
echo "🧪 Running tests..."
8282
$RUN_SCRIPT_COMMAND test:ci
8383
TEST_EXIT_CODE=$?
84-
84+
8585
echo "test-exit-code=$TEST_EXIT_CODE" >> $GITHUB_OUTPUT
86-
86+
8787
if [ "$FAIL_ON_ERROR" = "true" ] && [ $TEST_EXIT_CODE -ne 0 ]; then
8888
echo "::error::Tests failed with exit code $TEST_EXIT_CODE"
8989
fi
90-
90+
9191
# Always exit successfully here; we'll handle the failure later if needed
9292
exit 0
9393

0 commit comments

Comments
 (0)