mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-29 08:00:06 +00:00
build(scripts): server ratchets share one baseline library at the repository root
scripts/lib/ratchet.mjs carries the tree walk, the CRLF-safe reader and the baseline handling the client ratchets already use, next to a warning tally and a format comparison that take ESLint and Prettier from the calling workspace. server lint:size now runs on it with the same messages and exit codes, and the libraries have node:test suites that CI runs in the server job.
This commit is contained in:
@@ -37,12 +37,14 @@ export const AREAS = {
|
||||
// The type, lint, test, coverage, bundle and end-to-end jobs. npm workspaces
|
||||
// hoist every dependency into the root lockfile, so a dependency bump touches
|
||||
// none of the package directories. The Dockerfile and the entrypoint script
|
||||
// are pinned by server/tests/unit/docker-entrypoint.test.ts.
|
||||
// are pinned by server/tests/unit/docker-entrypoint.test.ts. scripts/lib/
|
||||
// holds the ratchet code the server and shared gates run.
|
||||
code: [
|
||||
'server/',
|
||||
'client/',
|
||||
'shared/',
|
||||
'plugin-sdk/',
|
||||
'scripts/lib/',
|
||||
'package.json',
|
||||
'package-lock.json',
|
||||
'.nvmrc',
|
||||
|
||||
@@ -48,6 +48,10 @@ describe('classify', () => {
|
||||
assert.deepEqual(classify(['plugin-sdk/src/index.ts']), { code: true, image: false, deploy: false });
|
||||
});
|
||||
|
||||
it('runs the tests but not the image for a change to the shared ratchet code', () => {
|
||||
assert.deepEqual(classify(['scripts/lib/ratchet.mjs']), { code: true, image: false, deploy: false });
|
||||
});
|
||||
|
||||
it('runs the image but not the tests for a .dockerignore change', () => {
|
||||
assert.deepEqual(classify(['.dockerignore']), { code: false, image: true, deploy: false });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user