Skip to content

Commit f521edc

Browse files
authored
ci: run unit and integration tests separately (#16)
1 parent 852a4ec commit f521edc

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

packages/toolbox-core/integration.cloudbuild.yaml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,13 @@ steps:
2020
args:
2121
- -c
2222
- npm ci
23-
- id: Run tests
23+
- id: Run unit tests
2424
name: 'node:${_VERSION}'
2525
entrypoint: /bin/bash
2626
dir: packages/toolbox-core
27-
env:
28-
- TOOLBOX_URL=$_TOOLBOX_URL
29-
- TOOLBOX_VERSION=$_TOOLBOX_VERSION
30-
- GOOGLE_CLOUD_PROJECT=$PROJECT_ID
3127
args:
3228
- '-c'
33-
- npm test
29+
- npm run test:unit
3430
options:
3531
logging: CLOUD_LOGGING_ONLY
3632
substitutions:

packages/toolbox-core/jest.config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"testMatch": [
3-
"<rootDir>/test/**"
3+
"<rootDir>/test/*.ts"
44
],
55
"preset": "ts-jest",
66
"testEnvironment": "node"

packages/toolbox-core/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
"compile": "tsc -p .",
3535
"prepare": "npm run compile",
3636
"webpack": "webpack",
37-
"test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest"
37+
"test:unit": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --config jest.config.json",
38+
"coverage": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --config jest.config.json --coverage"
3839
},
3940
"devDependencies": {
4041
"@types/jest": "^29.5.14",

0 commit comments

Comments
 (0)