chore: split ci test scripts
This commit is contained in:
parent
35088db1f3
commit
166141102b
24
azure-pipelines-template.yml
Normal file
24
azure-pipelines-template.yml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
jobs:
|
||||||
|
- job: ${{ parameters.name }}
|
||||||
|
pool:
|
||||||
|
vmImage: ${{ parameters.vmImage }}
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
node_8_x:
|
||||||
|
node_version: 8.x
|
||||||
|
node_10_x:
|
||||||
|
node_version: 10.x
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- task: NodeTool@0
|
||||||
|
inputs:
|
||||||
|
versionSpec: $(node_version)
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
node --version
|
||||||
|
npm --version
|
||||||
|
yarn --version
|
||||||
|
yarn
|
||||||
|
yarn bootstrap
|
||||||
|
${{ parameters.script }}
|
@ -1,24 +1,12 @@
|
|||||||
# Node.js
|
jobs:
|
||||||
# Build a general Node.js project with npm.
|
- template: azure-pipelines-template.yml
|
||||||
# Add steps that analyze code, save build artifacts, deploy, and more:
|
parameters:
|
||||||
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript
|
name: unit tests
|
||||||
|
|
||||||
pool:
|
|
||||||
vmImage: 'Ubuntu-16.04'
|
vmImage: 'Ubuntu-16.04'
|
||||||
|
script: yarn test:ci
|
||||||
|
|
||||||
strategy:
|
- template: azure-pipelines-template.yml
|
||||||
matrix:
|
parameters:
|
||||||
node_8_x:
|
name: e2e tests
|
||||||
node_version: 8.x
|
vmImage: 'Ubuntu-16.04'
|
||||||
node_10_x:
|
script: yarn test:e2e:ci
|
||||||
node_version: 10.x
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- task: NodeTool@0
|
|
||||||
inputs:
|
|
||||||
versionSpec: $(node_version)
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
yarn
|
|
||||||
yarn bootstrap
|
|
||||||
yarn test:ci
|
|
||||||
|
@ -13,8 +13,10 @@
|
|||||||
"clean": "rimraf packages/*/dist dev-test/dist",
|
"clean": "rimraf packages/*/dist dev-test/dist",
|
||||||
"clean:lerna": "lerna clean --yes",
|
"clean:lerna": "lerna clean --yes",
|
||||||
"reset": "run-s clean clean:lerna",
|
"reset": "run-s clean clean:lerna",
|
||||||
"test": "run-s clean lint test:unit test:e2e",
|
"test": "run-s clean lint test:unit",
|
||||||
"test:ci": "run-s clean lint-quiet test:unit test:e2e:ci",
|
"test:ci": "run-s clean lint-quiet test:unit",
|
||||||
|
"test:all": "run-s test test:e2e",
|
||||||
|
"test:all:ci": "run-s test:ci test:e2e:ci",
|
||||||
"test:unit": "cross-env NODE_ENV=test jest --no-cache",
|
"test:unit": "cross-env NODE_ENV=test jest --no-cache",
|
||||||
"test:e2e": "run-s build:demo test:e2e:run",
|
"test:e2e": "run-s build:demo test:e2e:run",
|
||||||
"test:e2e:ci": "run-s build:demo test:e2e:run-ci",
|
"test:e2e:ci": "run-s build:demo test:e2e:run-ci",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user