diff --git a/azure-pipelines-template.yml b/azure-pipelines-template.yml new file mode 100644 index 00000000000..5095985bfd4 --- /dev/null +++ b/azure-pipelines-template.yml @@ -0,0 +1,117 @@ +jobs: + - job: linux + pool: + vmImage: ubuntu-16.04 + strategy: + maxParallel: 3 + matrix: + node-10: + node_version: ^10.10.0 + node-8: + node_version: ^8.12.0 + node-6: + node_version: ^6.14.4 + steps: + - task: NodeTool@0 + displayName: "Install Node.js" + inputs: + versionSpec: $(node_version) + - script: | + npm install -g npm@latest + displayName: "Install npm" + - script: | + npm ci + displayName: "Install dependencies" + - script: | + ./node_modules/.bin/lerna bootstrap + displayName: "Lerna bootstrap" + - script: | + npm test + displayName: "Run tests" + - task: PublishTestResults@2 + displayName: 'Publish Test Results' + inputs: + testResultsFiles: '**junit*.xml' + testRunTitle: TestRun ${{ parameters.name }} $(node_version) + - task: PublishCodeCoverageResults@1 + displayName: 'Publish code coverage results' + inputs: + codeCoverageTool: 'cobertura' + summaryFileLocation: '**/coverage/cobertura-coverage.xml' + - job: macos + pool: + vmImage: "macOS 10.13" + strategy: + maxParallel: 3 + matrix: + node-10: + node_version: ^10.10.0 + node-8: + node_version: ^8.12.0 + steps: + - task: NodeTool@0 + displayName: "Install Node.js" + inputs: + versionSpec: $(node_version) + - script: | + npm install -g npm@latest + displayName: "Install npm" + - script: | + npm ci + displayName: "Install dependencies" + - script: | + ./node_modules/.bin/lerna bootstrap + displayName: "Lerna bootstrap" + - script: | + npm test + displayName: "Run tests" + - task: PublishTestResults@2 + displayName: 'Publish Test Results' + inputs: + testResultsFiles: '**junit*.xml' + testRunTitle: TestRun ${{ parameters.name }} $(node_version) + - task: PublishCodeCoverageResults@1 + displayName: 'Publish code coverage results' + inputs: + codeCoverageTool: 'cobertura' + summaryFileLocation: '**/coverage/cobertura-coverage.xml' + - job: windows + pool: + vmImage: vs2017-win2016 + strategy: + maxParallel: 3 + matrix: + node-8: + node_version: ^8.12.0 + node-6: + node_version: ^6.14.4 + steps: + - task: NodeTool@0 + displayName: "Install Node.js" + inputs: + versionSpec: $(node_version) + - script: | + npm install -g npm@latest + displayName: "Install npm" + - script: | + npm ci + displayName: "Install dependencies" + - script: | + ./node_modules/.bin/lerna.cmd bootstrap + displayName: "Lerna bootstrap" + - script: | + npm test + displayName: "Run tests" + - task: PublishTestResults@2 + displayName: 'Publish Test Results' + inputs: + testResultsFiles: '**junit*.xml' + testRunTitle: TestRun ${{ parameters.name }} $(node_version) + - task: PublishCodeCoverageResults@1 + displayName: 'Publish code coverage results' + inputs: + codeCoverageTool: 'cobertura' + summaryFileLocation: '**coverage/cobertura-coverage.xml' + +variables: + nproc: 4 \ No newline at end of file diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5095985bfd4..39efe8be195 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,117 +1,15 @@ jobs: - - job: linux - pool: - vmImage: ubuntu-16.04 - strategy: - maxParallel: 3 - matrix: - node-10: - node_version: ^10.10.0 - node-8: - node_version: ^8.12.0 - node-6: - node_version: ^6.14.4 - steps: - - task: NodeTool@0 - displayName: "Install Node.js" - inputs: - versionSpec: $(node_version) - - script: | - npm install -g npm@latest - displayName: "Install npm" - - script: | - npm ci - displayName: "Install dependencies" - - script: | - ./node_modules/.bin/lerna bootstrap - displayName: "Lerna bootstrap" - - script: | - npm test - displayName: "Run tests" - - task: PublishTestResults@2 - displayName: 'Publish Test Results' - inputs: - testResultsFiles: '**junit*.xml' - testRunTitle: TestRun ${{ parameters.name }} $(node_version) - - task: PublishCodeCoverageResults@1 - displayName: 'Publish code coverage results' - inputs: - codeCoverageTool: 'cobertura' - summaryFileLocation: '**/coverage/cobertura-coverage.xml' - - job: macos - pool: - vmImage: "macOS 10.13" - strategy: - maxParallel: 3 - matrix: - node-10: - node_version: ^10.10.0 - node-8: - node_version: ^8.12.0 - steps: - - task: NodeTool@0 - displayName: "Install Node.js" - inputs: - versionSpec: $(node_version) - - script: | - npm install -g npm@latest - displayName: "Install npm" - - script: | - npm ci - displayName: "Install dependencies" - - script: | - ./node_modules/.bin/lerna bootstrap - displayName: "Lerna bootstrap" - - script: | - npm test - displayName: "Run tests" - - task: PublishTestResults@2 - displayName: 'Publish Test Results' - inputs: - testResultsFiles: '**junit*.xml' - testRunTitle: TestRun ${{ parameters.name }} $(node_version) - - task: PublishCodeCoverageResults@1 - displayName: 'Publish code coverage results' - inputs: - codeCoverageTool: 'cobertura' - summaryFileLocation: '**/coverage/cobertura-coverage.xml' - - job: windows - pool: - vmImage: vs2017-win2016 - strategy: - maxParallel: 3 - matrix: - node-8: - node_version: ^8.12.0 - node-6: - node_version: ^6.14.4 - steps: - - task: NodeTool@0 - displayName: "Install Node.js" - inputs: - versionSpec: $(node_version) - - script: | - npm install -g npm@latest - displayName: "Install npm" - - script: | - npm ci - displayName: "Install dependencies" - - script: | - ./node_modules/.bin/lerna.cmd bootstrap - displayName: "Lerna bootstrap" - - script: | - npm test - displayName: "Run tests" - - task: PublishTestResults@2 - displayName: 'Publish Test Results' - inputs: - testResultsFiles: '**junit*.xml' - testRunTitle: TestRun ${{ parameters.name }} $(node_version) - - task: PublishCodeCoverageResults@1 - displayName: 'Publish code coverage results' - inputs: - codeCoverageTool: 'cobertura' - summaryFileLocation: '**coverage/cobertura-coverage.xml' +- template: azure-pipelines-template.yml + parameters: + name: macOS + vmImage: macOS-10.13 -variables: - nproc: 4 \ No newline at end of file +- template: azure-pipelines-template.yml + parameters: + name: Linux + vmImage: ubuntu-16.04 + +- template: azure-pipelines-template.yml + parameters: + name: Windows + vmImage: vs2017-win2016 \ No newline at end of file