mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 06:05:11 +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
|
||||
# --------------------------------------------------------------------------
|
||||
test-dev:
|
||||
executor: node
|
||||
steps:
|
||||
- attach-project
|
||||
- run:
|
||||
name: Dev Tests
|
||||
command: yarn test:dev -w=2
|
||||
|
||||
test-unit:
|
||||
executor: node
|
||||
steps:
|
||||
- attach-project
|
||||
- run:
|
||||
name: Unit Tests
|
||||
command: yarn test:unit -w=2 --coverage && yarn coverage -F unit
|
||||
command: yarn test:unit --coverage && yarn coverage -F unit
|
||||
environment:
|
||||
JEST_JUNIT_OUTPUT_NAME: unit.xml
|
||||
- store-test-results
|
||||
@ -189,6 +197,7 @@ workflows:
|
||||
- audit: { requires: [setup] }
|
||||
- build: { requires: [setup] }
|
||||
- lint-app: { requires: [build] }
|
||||
- test-dev: { requires: [build] }
|
||||
- test-unit: { requires: [build] }
|
||||
- test-e2e: { requires: [build] }
|
||||
- release-commit:
|
||||
@ -204,6 +213,7 @@ workflows:
|
||||
- audit: { requires: [setup] }
|
||||
- build: { requires: [setup] }
|
||||
- lint-app: { requires: [build] }
|
||||
- test-dev: { requires: [build] }
|
||||
- test-unit: { requires: [build] }
|
||||
- test-e2e: { requires: [build] }
|
||||
- release-nightly:
|
||||
|
@ -24,7 +24,11 @@ steps:
|
||||
displayName: 'Test: Build Fixtures'
|
||||
|
||||
- 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'
|
||||
|
||||
- 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",
|
||||
"nuxt": "node -r esm ./packages/cli/bin/nuxt-cli.js",
|
||||
"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:fixtures": "jest test/fixtures --forceExit",
|
||||
"test:lint": "yarn lint",
|
||||
"test:unit": "jest test/unit packages --forceExit"
|
||||
"test:unit": "jest packages --forceExit"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.7.4",
|
||||
|
Loading…
Reference in New Issue
Block a user