From 41b5f44288c36d3eea81c4a0c1c8f51d31090596 Mon Sep 17 00:00:00 2001 From: Futago-za Ryuu Date: Fri, 25 Jan 2019 04:50:15 +0000 Subject: [PATCH] Use Pipeline templates from futagoza/apt --- azure-pipelines.yml | 82 +++++++++++---------------------------------- 1 file changed, 20 insertions(+), 62 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3c31e89..b5f21af 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,68 +1,26 @@ name: $(BuildID) -pool: - vmImage: 'ubuntu-16.04' +resources: + repositories: + - repository: apt + type: github + name: futagoza/apt variables: - group: 'env-variables' -strategy: - maxParallel: 3 - matrix: - Node 6: - node_version: 6.x - Node 8: - node_version: 8.x - Node 10: - node_version: 10.x - -steps: -- task: NodeTool@0 - inputs: - versionSpec: $(node_version) - displayName: 'Install Node.js' - -- script: | - yarn install --ignore-engines - echo 'Downloading Code Climate Test Reporter...' - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter - chmod +x ./cc-test-reporter - echo 'Done downloading Code Climate Test Reporter.' - displayName: 'Install dependencies' - -- script: | - ./cc-test-reporter before-build - yarn ci 2> /dev/null - if [ $? -eq 0 ] - then - echo '"yarn ci" passed, publishing to code climate.' - ./cc-test-reporter after-build --exit-code 0 - echo 'Publishing code coverage results to coveralls.io' - yarn coverage - exit 0 - else - echo '"yarn ci" failed, publishing to code climate.' - ./cc-test-reporter after-build --exit-code 1 - exit 1 - fi - displayName: 'eslint > mocha > codeclimate & coveralls' - env: - CC_TEST_REPORTER_ID: $(CC_TEST_REPORTER_ID) - COVERALLS_SERVICE_NAME: $(COVERALLS_SERVICE_NAME) - COVERALLS_REPO_TOKEN: $(COVERALLS_REPO_TOKEN) - GIT_BRANCH: $(Build.SourceBranch) - GIT_COMMIT_SHA: $(Build.SourceVersion) - -- task: PublishTestResults@2 - displayName: 'Publish test results (Azure Pipelines)' - condition: succeededOrFailed() - inputs: - testRunner: JUnit - testResultsFiles: 'test/junit-results.xml' - -- task: PublishCodeCoverageResults@1 - displayName: 'Publish code coverage results (Azure Pipelines)' - inputs: - codeCoverageTool: Cobertura - summaryFileLocation: '$(System.DefaultWorkingDirectory)/coverage/cobertura-coverage.xml' - reportDirectory: '$(System.DefaultWorkingDirectory)/coverage/lcov-report' +jobs: + +- template: eslint.yml@apt + +- template: node-test.yml@apt + parameters: + node_version: 6.x + after: + - script: yarn coverage + env: + COVERALLS_SERVICE_NAME: $(COVERALLS_SERVICE_NAME) + COVERALLS_REPO_TOKEN: $(COVERALLS_REPO_TOKEN) + GIT_BRANCH: $(Build.SourceBranch) + GIT_COMMIT_SHA: $(Build.SourceVersion) + azure_coverage: True