@galadrim/galadmin 0.2.9 → 0.2.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,37 @@
1
+ name: CI
2
+
3
+ on:
4
+ pull_request:
5
+ workflow_call:
6
+
7
+ jobs:
8
+ test:
9
+ runs-on: ubicloud-standard-2
10
+ steps:
11
+ - name: Checkout code
12
+ uses: actions/checkout@v2
13
+ - uses: actions/setup-node@v3
14
+ with:
15
+ node-version: 22
16
+ - name: Dependencies installation
17
+ run: npm install
18
+ - name: Front-end - Load cache
19
+ uses: actions/cache@v4
20
+ with:
21
+ path: '**/src/front/node_modules'
22
+ key: ${{ runner.os }}-npm-front-${{ hashFiles('**/src/front/package-lock.json') }}
23
+ - name: Front-end - Dependencies installation
24
+ run: npm install
25
+ working-directory: ./src/front
26
+ # The root tsconfig includes the custom CKEditor source under src/front.
27
+ - name: Typecheck
28
+ run: npm run typecheck
29
+ - name: Run unit tests
30
+ run: npm test
31
+ - name: Run integration tests (real MySQL/PostgreSQL via testcontainers)
32
+ run: npm run test:integration
33
+ env:
34
+ TEST_INTEGRATION: '1'
35
+ - name: Run front-end tests
36
+ run: npm test -- --watchAll=false
37
+ working-directory: ./src/front
@@ -6,34 +6,7 @@ on:
6
6
 
7
7
  jobs:
8
8
  test:
9
- runs-on: ubicloud-standard-2
10
- env:
11
- CI: false
12
- steps:
13
- - name: Checkout code
14
- uses: actions/checkout@v2
15
- - uses: actions/setup-node@v3
16
- with:
17
- node-version: 22
18
- - name: Dependencies installation
19
- run: npm install
20
- - name: Run unit tests
21
- run: npm test
22
- - name: Run integration tests (real MySQL/PostgreSQL via testcontainers)
23
- run: npm run test:integration
24
- env:
25
- TEST_INTEGRATION: '1'
26
- - name: Front-end - Load cache
27
- uses: actions/cache@v4
28
- with:
29
- path: '**/src/front/node_modules'
30
- key: ${{ runner.os }}-npm-front-${{ hashFiles('**/src/front/package-lock.json') }}
31
- - name: Front-end - Dependencies installation
32
- run: npm install
33
- working-directory: ./src/front
34
- - name: Run front-end tests
35
- run: npm test -- --watchAll=false
36
- working-directory: ./src/front
9
+ uses: ./.github/workflows/ci.yml
37
10
 
38
11
  build-and-deploy:
39
12
  needs: test
package/README.md CHANGED
@@ -302,6 +302,7 @@ engines (see below); the unit suite covers pure logic and configuration wiring
302
302
  without any database.
303
303
 
304
304
  ```bash
305
+ npm run typecheck # check backend TypeScript without emitting build files
305
306
  npm test # run the unit suite (no database required)
306
307
  npm run test:watch # watch mode
307
308
  npm run test:coverage # unit + integration merged report (Docker required)
@@ -323,6 +324,12 @@ npm run test:all # unit suite + integration suite
323
324
  reachable Docker daemon and fails without one, so a broken Docker setup in CI
324
325
  cannot pass silently.
325
326
 
327
+ The `CI` GitHub Actions workflow runs typechecking, backend unit and integration
328
+ tests, and frontend tests on pull requests. The deployment workflow reuses the
329
+ same workflow and only builds and publishes after it passes. To require these
330
+ checks before merging, configure the CI test check as required in the target
331
+ branch's protection rules.
332
+
326
333
  ### Known robustness limitations
327
334
 
328
335
  The former `tests/security-known-gaps.test.ts` suite encoded unfixed security
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galadrim/galadmin",
3
- "version": "0.2.9",
3
+ "version": "0.2.10",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "test": "jest",
@@ -9,7 +9,8 @@
9
9
  "test:coverage": "TEST_INTEGRATION=1 jest --coverage --runInBand --projects jest.config.js jest.integration.config.js",
10
10
  "test:integration": "TEST_INTEGRATION=1 jest --config jest.integration.config.js --runInBand",
11
11
  "test:all": "npm run test:unit && npm run test:integration",
12
- "build": "tsc"
12
+ "build": "tsc",
13
+ "typecheck": "tsc --noEmit --incremental false"
13
14
  },
14
15
  "engines": {
15
16
  "node": ">=22"