chore: decouple lint/test scripts, standardize naming, and create reu… - #204
Conversation
03dd514 to
9f74867
Compare
…sable CI action - Remove lint from pretest to decouple linting from testing - Rename compile → compile:extension, compile-tests → compile:tests, watch-tests → watch:tests - Eliminate redundant compile-tests calls across npm scripts - Remove unnecessary matrix from validate job, use env.NODE_VERSION - Create .github/actions/setup-repo composite action (node setup + install) - Externalize harden-runner and checkout from setup-repo so callers control them directly - Use setup-repo action across all CI/publish workflows where applicable - Update all docs, scripts, and CI workflows accordingly Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
9f74867 to
0deac84
Compare
gblanc-1a
left a comment
There was a problem hiding this comment.
Duplication on the first comment is for me the most important blocking command
| "test:unit": "npx mocha --ui tdd --require ./test/mocha.setup.js --require ./test/unit.setup.js 'test-dist/test/**/*.test.js' --ignore 'test-dist/test/suite/**/*.test.js' --timeout 5000", | ||
| "test:integration": "npm run compile-tests && node ./test/runExtensionTests.js", | ||
| "test:all": "npm run compile-tests && npm run test:unit && npm run test:integration", | ||
| "test:coverage": "npm run compile-tests && c8 npm run test:all", |
There was a problem hiding this comment.
What do you think of a test:ai that does both compilation and test one after the other ?
To avoid having the ai trigger multiple commands / forgetting about compiling.
Happened to me already multiple times that the AI forgot to compile before running a direct test command was thinking the same might happen or we will need to update the AGENTS.md
What do you think ? Would even go further if we go with test:ai and add the rm -rf of the test-dist.
Happened regularly to me when switching branches to review PR
There was a problem hiding this comment.
I'm not in favor of test:ai
I didn't face that issue using AI, maybe because it's explained in the troubleshooting sectiong of the readme
There was a problem hiding this comment.
As agreed we should put back the test compilation until we change to a more modern testing framework that handle it by itself
| "build": "tsc", | ||
| "watch": "tsc --watch", | ||
| "compile-tests": "tsc -p tsconfig.test.json", | ||
| "test": "npm run compile-tests && mocha 'dist-test/test/**/*.test.js'", |
There was a problem hiding this comment.
As discussed we should put back the compile-tests in there to avoid having to do it manually each time we update a test
| run: npm run build --workspace=lib | ||
|
|
||
| - name: Run linter | ||
| run: npm run lint |
There was a problem hiding this comment.
| run: npm run lint | |
| run: npm run lint && npm run lint --workspace=lib |
…sable CI action
Description
Type of Change
Related Issues
Closes #
Fixes #
Relates to #
Changes Made
Testing
Test Coverage
Manual Testing Steps
Tested On
macOS
Windows
Linux
VS Code Stable
VS Code Insiders
Screenshots
Checklist
Documentation
Additional Notes
Reviewer Guidelines
Please pay special attention to:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache License 2.0.