Skip to content

Commit 668fa53

Browse files
committed
add new node:test unit test target
1 parent 47907fe commit 668fa53

12 files changed

Lines changed: 48 additions & 8 deletions

.github/workflows/tests_ci.yml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,19 @@ jobs:
227227
S3_REGION: us-east-1
228228
DATABASE_URL: mysql://root:testpass@localhost:3306/test_db
229229

230+
node_unit_tests:
231+
name: node:test unit tests
232+
runs-on: ubuntu-latest
233+
timeout-minutes: 10
234+
steps:
235+
- uses: actions/checkout@main
236+
- uses: ./.github/actions/ci-setup
237+
238+
- name: node:test unit tests
239+
run: pnpm test:node:nodb
240+
env:
241+
DATABASE_URL: file:./test.db
242+
230243
node_postgresql:
231244
name: node:test PostgreSQL
232245
runs-on: ubuntu-latest
@@ -244,8 +257,8 @@ jobs:
244257
- uses: actions/checkout@main
245258
- uses: ./.github/actions/ci-setup
246259

247-
- name: node:test tests
248-
run: pnpm test:node
260+
- name: node:test database tests
261+
run: pnpm test:node:db
249262
env:
250263
DATABASE_URL: postgres://testuser:testpass@localhost:5432/test_db
251264

@@ -257,8 +270,8 @@ jobs:
257270
- uses: actions/checkout@main
258271
- uses: ./.github/actions/ci-setup
259272

260-
- name: node:test tests
261-
run: pnpm test:node
273+
- name: node:test database tests
274+
run: pnpm test:node:db
262275
env:
263276
DATABASE_URL: file:./test.db
264277

@@ -277,8 +290,8 @@ jobs:
277290
- uses: actions/checkout@main
278291
- uses: ./.github/actions/ci-setup
279292

280-
- name: node:test tests
281-
run: pnpm test:node
293+
- name: node:test database tests
294+
run: pnpm test:node:db
282295
env:
283296
DATABASE_URL: mysql://root:testpass@localhost:3306/test_db
284297

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
"test:types": "tsc",
1717
"test:debug": "node --inspect-brk ./node_modules/.bin/jest",
1818
"test:admin-ui": "jest tests/admin-ui-tests",
19-
"test:node": "node --import tsx --test --test-concurrency 4 tests2/*.test.ts",
20-
"test:node:only": "node --import tsx --test-only tests2/*.test.ts",
19+
"test:node:db": "node --import tsx --test --test-concurrency 4 tests2/*.testdb.ts",
20+
"test:node:nodb": "node --import tsx --test --test-concurrency 4 tests2/*.test.ts tests2/**/*.test.ts",
2121
"lint": "eslint",
2222
"lint:fix": "eslint --fix",
2323
"build": "preconstruct build",

pnpm-lock.yaml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)