mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
chore(ci): separate dev test and unit test (#6737)
This commit is contained in:
parent
75a29c8b13
commit
bd0ef6f01f
@ -130,13 +130,21 @@ jobs:
|
|||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
# Phase 3: Unit and E2E tests
|
# Phase 3: Unit and E2E tests
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
|
test-dev:
|
||||||
|
executor: node
|
||||||
|
steps:
|
||||||
|
- attach-project
|
||||||
|
- run:
|
||||||
|
name: Dev Tests
|
||||||
|
command: yarn test:dev -w=2
|
||||||
|
|
||||||
test-unit:
|
test-unit:
|
||||||
executor: node
|
executor: node
|
||||||
steps:
|
steps:
|
||||||
- attach-project
|
- attach-project
|
||||||
- run:
|
- run:
|
||||||
name: Unit Tests
|
name: Unit Tests
|
||||||
command: yarn test:unit -w=2 --coverage && yarn coverage -F unit
|
command: yarn test:unit --coverage && yarn coverage -F unit
|
||||||
environment:
|
environment:
|
||||||
JEST_JUNIT_OUTPUT_NAME: unit.xml
|
JEST_JUNIT_OUTPUT_NAME: unit.xml
|
||||||
- store-test-results
|
- store-test-results
|
||||||
@ -189,6 +197,7 @@ workflows:
|
|||||||
- audit: { requires: [setup] }
|
- audit: { requires: [setup] }
|
||||||
- build: { requires: [setup] }
|
- build: { requires: [setup] }
|
||||||
- lint-app: { requires: [build] }
|
- lint-app: { requires: [build] }
|
||||||
|
- test-dev: { requires: [build] }
|
||||||
- test-unit: { requires: [build] }
|
- test-unit: { requires: [build] }
|
||||||
- test-e2e: { requires: [build] }
|
- test-e2e: { requires: [build] }
|
||||||
- release-commit:
|
- release-commit:
|
||||||
@ -204,6 +213,7 @@ workflows:
|
|||||||
- audit: { requires: [setup] }
|
- audit: { requires: [setup] }
|
||||||
- build: { requires: [setup] }
|
- build: { requires: [setup] }
|
||||||
- lint-app: { requires: [build] }
|
- lint-app: { requires: [build] }
|
||||||
|
- test-dev: { requires: [build] }
|
||||||
- test-unit: { requires: [build] }
|
- test-unit: { requires: [build] }
|
||||||
- test-e2e: { requires: [build] }
|
- test-e2e: { requires: [build] }
|
||||||
- release-nightly:
|
- release-nightly:
|
||||||
|
@ -24,7 +24,11 @@ steps:
|
|||||||
displayName: 'Test: Build Fixtures'
|
displayName: 'Test: Build Fixtures'
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set JEST_JUNIT_OUTPUT_NAME=unit.xml && set NODE_OPTIONS=--max_old_space_size=4096 && yarn test:unit -w=2
|
set NODE_OPTIONS=--max_old_space_size=4096 && yarn test:dev -w2
|
||||||
|
displayName: 'Test: Run dev tests'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
set JEST_JUNIT_OUTPUT_NAME=unit.xml && set NODE_OPTIONS=--max_old_space_size=4096 && yarn test:unit
|
||||||
displayName: 'Test: Run unit tests'
|
displayName: 'Test: Run unit tests'
|
||||||
|
|
||||||
- task: PublishTestResults@2
|
- task: PublishTestResults@2
|
||||||
|
@ -23,11 +23,12 @@
|
|||||||
"lint:app": "eslint-multiplexer eslint --ignore-path packages/vue-app/template/.eslintignore 'test/fixtures/!(missing-plugin)/.nuxt!(-dev)/**' | eslint-multiplexer -b",
|
"lint:app": "eslint-multiplexer eslint --ignore-path packages/vue-app/template/.eslintignore 'test/fixtures/!(missing-plugin)/.nuxt!(-dev)/**' | eslint-multiplexer -b",
|
||||||
"nuxt": "node -r esm ./packages/cli/bin/nuxt-cli.js",
|
"nuxt": "node -r esm ./packages/cli/bin/nuxt-cli.js",
|
||||||
"pkg": "node -r esm ./scripts/package",
|
"pkg": "node -r esm ./scripts/package",
|
||||||
"test": "yarn test:fixtures && yarn test:unit",
|
"test": "yarn test:fixtures && yarn test:dev && yarn test:unit",
|
||||||
|
"test:dev": "jest test/unit --forceExit",
|
||||||
"test:e2e": "jest -i test/e2e --forceExit",
|
"test:e2e": "jest -i test/e2e --forceExit",
|
||||||
"test:fixtures": "jest test/fixtures --forceExit",
|
"test:fixtures": "jest test/fixtures --forceExit",
|
||||||
"test:lint": "yarn lint",
|
"test:lint": "yarn lint",
|
||||||
"test:unit": "jest test/unit packages --forceExit"
|
"test:unit": "jest packages --forceExit"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.7.4",
|
"@babel/core": "^7.7.4",
|
||||||
|
Loading…
Reference in New Issue
Block a user