From 7b56c96dce5a3b5b6b26acba0180863a4008d5ee Mon Sep 17 00:00:00 2001 From: "azure-pipelines[bot]" Date: Sun, 20 Jan 2019 22:55:53 +0000 Subject: [PATCH 01/17] chore: set up CI with Azure Pipelines --- azure-pipelines.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 000000000000..48ba16586522 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,31 @@ +# Node.js +# Build a general Node.js project with npm. +# Add steps that analyze code, save build artifacts, deploy, and more: +# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript + +trigger: +- master + +pool: + vmImage: 'Ubuntu-16.04' +strategy: + matrix: + node_11_x: + node_version: 11.x + node_10_x: + node_version: 10.x + node_8_x: + node_version: 8.x + node_6_x: + node_version: 6.x + +steps: +- task: NodeTool@0 + inputs: + versionSpec: $(node_version) + +- script: | + # This also runs a build as part of the postinstall + # bootstrap + yarn --ignore-engines --frozen-lockfile + displayName: 'Install and bootstrap all packages' From 48ae9dba51c75d58e2ebde55db386811c41926b5 Mon Sep 17 00:00:00 2001 From: James Henry Date: Sun, 20 Jan 2019 18:07:41 -0500 Subject: [PATCH 02/17] chore: try maxParallel --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 48ba16586522..013986616be5 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -9,6 +9,7 @@ trigger: pool: vmImage: 'Ubuntu-16.04' strategy: + maxParallel: 4 matrix: node_11_x: node_version: 11.x From 412580bfc2308c7a9f84e0e50565c490d67457c6 Mon Sep 17 00:00:00 2001 From: James Henry Date: Sun, 20 Jan 2019 18:11:27 -0500 Subject: [PATCH 03/17] build: add yarn test --- azure-pipelines.yml | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 013986616be5..4bed23f2ba8b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -4,7 +4,7 @@ # https://docs.microsoft.com/azure/devops/pipelines/languages/javascript trigger: -- master + - master pool: vmImage: 'Ubuntu-16.04' @@ -21,12 +21,17 @@ strategy: node_version: 6.x steps: -- task: NodeTool@0 - inputs: - versionSpec: $(node_version) + - task: NodeTool@0 + inputs: + versionSpec: $(node_version) + displayName: 'Install Node.js $(node_version)' -- script: | - # This also runs a build as part of the postinstall - # bootstrap - yarn --ignore-engines --frozen-lockfile - displayName: 'Install and bootstrap all packages' + - script: | + # This also runs a build as part of the postinstall + # bootstrap + yarn --ignore-engines --frozen-lockfile + displayName: 'Install and bootstrap all packages' + + - script: | + yarn test + displayName: 'Run unit tests' From 4d5ed115621d85e529d67f8a96c9261513f41337 Mon Sep 17 00:00:00 2001 From: James Henry Date: Sun, 20 Jan 2019 18:39:19 -0500 Subject: [PATCH 04/17] build: try multiple jobs --- azure-pipelines.yml | 73 ++++++++++++++++++++++++++------------------- 1 file changed, 42 insertions(+), 31 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4bed23f2ba8b..d15199336dc2 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,37 +1,48 @@ -# Node.js -# Build a general Node.js project with npm. -# Add steps that analyze code, save build artifacts, deploy, and more: -# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript - trigger: - master -pool: - vmImage: 'Ubuntu-16.04' -strategy: - maxParallel: 4 - matrix: - node_11_x: - node_version: 11.x - node_10_x: - node_version: 10.x - node_8_x: - node_version: 8.x - node_6_x: - node_version: 6.x +jobs: + - job: validate_commit_and_code + displayName: Validate commit and code + pool: + vmImage: 'Ubuntu-16.04' + steps: + - task: NodeTool@0 + inputs: + versionSpec: 11 + displayName: 'Install Node.js 11' + + - script: | + commitlint-travis + yarn check-format -steps: - - task: NodeTool@0 - inputs: - versionSpec: $(node_version) - displayName: 'Install Node.js $(node_version)' + - job: run_unit_tests + displayName: Run unit tests on multiple Node.js versions + pool: + vmImage: 'Ubuntu-16.04' + strategy: + maxParallel: 4 + matrix: + node_11_x: + node_version: 11.x + node_10_x: + node_version: 10.x + node_8_x: + node_version: 8.x + node_6_x: + node_version: 6.x + steps: + - task: NodeTool@0 + inputs: + versionSpec: $(node_version) + displayName: 'Install Node.js $(node_version)' - - script: | - # This also runs a build as part of the postinstall - # bootstrap - yarn --ignore-engines --frozen-lockfile - displayName: 'Install and bootstrap all packages' + - script: | + # This also runs a build as part of the postinstall + # bootstrap + yarn --ignore-engines --frozen-lockfile + displayName: 'Install and bootstrap all packages' - - script: | - yarn test - displayName: 'Run unit tests' + - script: | + yarn test + displayName: 'Run unit tests' From cf3a3aeee8a4085ef16026972966eca5a867b37f Mon Sep 17 00:00:00 2001 From: James Henry Date: Sun, 20 Jan 2019 18:41:34 -0500 Subject: [PATCH 05/17] build: try job --- azure-pipelines.yml | 80 ++++++++++++++++++++++----------------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d15199336dc2..50d447c4a855 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -2,47 +2,47 @@ trigger: - master jobs: - - job: validate_commit_and_code - displayName: Validate commit and code - pool: - vmImage: 'Ubuntu-16.04' - steps: - - task: NodeTool@0 - inputs: - versionSpec: 11 - displayName: 'Install Node.js 11' +- job: validate_commit_and_code + displayName: Validate commit and code + pool: + vmImage: 'Ubuntu-16.04' + steps: + - task: NodeTool@0 + inputs: + versionSpec: 11 + displayName: 'Install Node.js 11' - - script: | - commitlint-travis - yarn check-format + - script: | + commitlint-travis + yarn check-format - - job: run_unit_tests - displayName: Run unit tests on multiple Node.js versions - pool: - vmImage: 'Ubuntu-16.04' - strategy: - maxParallel: 4 - matrix: - node_11_x: - node_version: 11.x - node_10_x: - node_version: 10.x - node_8_x: - node_version: 8.x - node_6_x: - node_version: 6.x - steps: - - task: NodeTool@0 - inputs: - versionSpec: $(node_version) - displayName: 'Install Node.js $(node_version)' +# - job: run_unit_tests +# displayName: Run unit tests on multiple Node.js versions +# pool: +# vmImage: 'Ubuntu-16.04' +# strategy: +# maxParallel: 4 +# matrix: +# node_11_x: +# node_version: 11.x +# node_10_x: +# node_version: 10.x +# node_8_x: +# node_version: 8.x +# node_6_x: +# node_version: 6.x +# steps: +# - task: NodeTool@0 +# inputs: +# versionSpec: $(node_version) +# displayName: 'Install Node.js $(node_version)' - - script: | - # This also runs a build as part of the postinstall - # bootstrap - yarn --ignore-engines --frozen-lockfile - displayName: 'Install and bootstrap all packages' +# - script: | +# # This also runs a build as part of the postinstall +# # bootstrap +# yarn --ignore-engines --frozen-lockfile +# displayName: 'Install and bootstrap all packages' - - script: | - yarn test - displayName: 'Run unit tests' +# - script: | +# yarn test +# displayName: 'Run unit tests' From e940bb9f301bc14eade474158ce21087a7776eed Mon Sep 17 00:00:00 2001 From: James Henry Date: Sun, 20 Jan 2019 18:44:52 -0500 Subject: [PATCH 06/17] build: try job --- azure-pipelines.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 50d447c4a855..d7984d64568a 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -12,8 +12,10 @@ jobs: versionSpec: 11 displayName: 'Install Node.js 11' - - script: | - commitlint-travis + - script: | + # This also runs a build as part of the postinstall + # bootstrap + yarn --ignore-engines --frozen-lockfile yarn check-format # - job: run_unit_tests From a100a1f06c5153f61e1e4141380503d3e9187c6c Mon Sep 17 00:00:00 2001 From: James Henry Date: Sun, 20 Jan 2019 18:50:23 -0500 Subject: [PATCH 07/17] build: try multiple jobs --- azure-pipelines.yml | 64 ++++++++++++++++++++++++--------------------- 1 file changed, 34 insertions(+), 30 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d7984d64568a..69c997b49a1c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -2,8 +2,8 @@ trigger: - master jobs: -- job: validate_commit_and_code - displayName: Validate commit and code +- job: primary_code_validation_and_unit_tests + displayName: Primary code validation and unit tests pool: vmImage: 'Ubuntu-16.04' steps: @@ -16,35 +16,39 @@ jobs: # This also runs a build as part of the postinstall # bootstrap yarn --ignore-engines --frozen-lockfile + + - script: | yarn check-format + displayName: 'Check code formatting' + + - script: | + yarn test + displayName: 'Run unit tests' -# - job: run_unit_tests -# displayName: Run unit tests on multiple Node.js versions -# pool: -# vmImage: 'Ubuntu-16.04' -# strategy: -# maxParallel: 4 -# matrix: -# node_11_x: -# node_version: 11.x -# node_10_x: -# node_version: 10.x -# node_8_x: -# node_version: 8.x -# node_6_x: -# node_version: 6.x -# steps: -# - task: NodeTool@0 -# inputs: -# versionSpec: $(node_version) -# displayName: 'Install Node.js $(node_version)' +- job: unit_tests_on_other_node_versions + displayName: Run unit tests on other Node.js versions + pool: + vmImage: 'Ubuntu-16.04' + strategy: + maxParallel: 3 + matrix: + node_10_x: + node_version: 10.x + node_8_x: + node_version: 8.x + node_6_x: + node_version: 6.x + steps: + - task: NodeTool@0 + inputs: + versionSpec: $(node_version) + displayName: 'Install Node.js $(node_version)' -# - script: | -# # This also runs a build as part of the postinstall -# # bootstrap -# yarn --ignore-engines --frozen-lockfile -# displayName: 'Install and bootstrap all packages' + - script: | + # This also runs a build as part of the postinstall + # bootstrap + yarn --ignore-engines --frozen-lockfile -# - script: | -# yarn test -# displayName: 'Run unit tests' + - script: | + yarn test + displayName: 'Run unit tests' From e171a96653a2fdd201f0e2449cefdb5dc983ab1c Mon Sep 17 00:00:00 2001 From: James Henry Date: Sun, 20 Jan 2019 18:53:46 -0500 Subject: [PATCH 08/17] build: better job names --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 69c997b49a1c..b2b462c8a833 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -3,7 +3,7 @@ trigger: jobs: - job: primary_code_validation_and_unit_tests - displayName: Primary code validation and unit tests + displayName: $(node_version) - Primary code validation and unit tests pool: vmImage: 'Ubuntu-16.04' steps: @@ -26,7 +26,7 @@ jobs: displayName: 'Run unit tests' - job: unit_tests_on_other_node_versions - displayName: Run unit tests on other Node.js versions + displayName: $(node_version) - Run unit tests on other Node.js versions pool: vmImage: 'Ubuntu-16.04' strategy: From e5d73934f7e770691e6637ac1722316ba7a3032a Mon Sep 17 00:00:00 2001 From: James Henry Date: Sun, 20 Jan 2019 18:55:21 -0500 Subject: [PATCH 09/17] build: format yaml --- azure-pipelines.yml | 88 ++++++++++++++++++++++----------------------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b2b462c8a833..1605cf6ab36c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -2,53 +2,53 @@ trigger: - master jobs: -- job: primary_code_validation_and_unit_tests - displayName: $(node_version) - Primary code validation and unit tests - pool: - vmImage: 'Ubuntu-16.04' - steps: - - task: NodeTool@0 - inputs: - versionSpec: 11 - displayName: 'Install Node.js 11' + - job: primary_code_validation_and_unit_tests + displayName: Primary code validation and unit tests + pool: + vmImage: 'Ubuntu-16.04' + steps: + - task: NodeTool@0 + inputs: + versionSpec: 11 + displayName: 'Install Node.js 11' - - script: | - # This also runs a build as part of the postinstall - # bootstrap - yarn --ignore-engines --frozen-lockfile + - script: | + # This also runs a build as part of the postinstall + # bootstrap + yarn --ignore-engines --frozen-lockfile - - script: | - yarn check-format - displayName: 'Check code formatting' + - script: | + yarn check-format + displayName: 'Check code formatting' - - script: | - yarn test - displayName: 'Run unit tests' + - script: | + yarn test + displayName: 'Run unit tests' -- job: unit_tests_on_other_node_versions - displayName: $(node_version) - Run unit tests on other Node.js versions - pool: - vmImage: 'Ubuntu-16.04' - strategy: - maxParallel: 3 - matrix: - node_10_x: - node_version: 10.x - node_8_x: - node_version: 8.x - node_6_x: - node_version: 6.x - steps: - - task: NodeTool@0 - inputs: - versionSpec: $(node_version) - displayName: 'Install Node.js $(node_version)' + - job: unit_tests_on_other_node_versions + displayName: Run unit tests on other Node.js versions + pool: + vmImage: 'Ubuntu-16.04' + strategy: + maxParallel: 3 + matrix: + node_10_x: + node_version: 10.x + node_8_x: + node_version: 8.x + node_6_x: + node_version: 6.x + steps: + - task: NodeTool@0 + inputs: + versionSpec: $(node_version) + displayName: 'Install Node.js $(node_version)' - - script: | - # This also runs a build as part of the postinstall - # bootstrap - yarn --ignore-engines --frozen-lockfile + - script: | + # This also runs a build as part of the postinstall + # bootstrap + yarn --ignore-engines --frozen-lockfile - - script: | - yarn test - displayName: 'Run unit tests' + - script: | + yarn test + displayName: 'Run unit tests' From d35015fee6a2467918cc8473ae228ed1f74a3d27 Mon Sep 17 00:00:00 2001 From: James Henry Date: Sun, 20 Jan 2019 19:03:22 -0500 Subject: [PATCH 10/17] build: try dockercompose task --- azure-pipelines.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1605cf6ab36c..504983b59777 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -2,8 +2,8 @@ trigger: - master jobs: - - job: primary_code_validation_and_unit_tests - displayName: Primary code validation and unit tests + - job: primary_code_validation_and_tests + displayName: Primary code validation and tests pool: vmImage: 'Ubuntu-16.04' steps: @@ -17,13 +17,18 @@ jobs: # bootstrap yarn --ignore-engines --frozen-lockfile - - script: | - yarn check-format - displayName: 'Check code formatting' + # - script: | + # yarn check-format + # displayName: 'Check code formatting' + + # - script: | + # yarn test + # displayName: 'Run unit tests' + - task: DockerCompose@0 - script: | - yarn test - displayName: 'Run unit tests' + yarn integration-tests + displayName: 'Run integrations tests' - job: unit_tests_on_other_node_versions displayName: Run unit tests on other Node.js versions From 0adee6ecac77f4265ddf7b1a772cf1a36ae065a1 Mon Sep 17 00:00:00 2001 From: James Henry Date: Sun, 20 Jan 2019 19:07:34 -0500 Subject: [PATCH 11/17] build: alt dockercompose attempt --- azure-pipelines.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 504983b59777..167800e91297 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -25,7 +25,6 @@ jobs: # yarn test # displayName: 'Run unit tests' - - task: DockerCompose@0 - script: | yarn integration-tests displayName: 'Run integrations tests' From b95112819067342566c62550c174ee71a1d38459 Mon Sep 17 00:00:00 2001 From: James Henry Date: Sun, 20 Jan 2019 19:13:31 -0500 Subject: [PATCH 12/17] build: uncomment steps, delete travis --- .travis.yml | 38 -------------------------------------- azure-pipelines.yml | 17 +++++++++++------ 2 files changed, 11 insertions(+), 44 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c18b22b64cb0..000000000000 --- a/.travis.yml +++ /dev/null @@ -1,38 +0,0 @@ -sudo: required -services: - - docker -language: node_js -cache: - yarn: true - directories: - - node_modules -notifications: - email: false -node_js: - - '11' - - '10' - - '8' - - '6' -install: - # This also runs a build as part of the postinstall - # bootstrap - - yarn --ignore-engines --frozen-lockfile -script: - # TODO: Fix this check - # - yarn workspace eslint-plugin docs:check - - yarn test - - yarn global add codecov -after_success: - - codecov -branches: - only: - - master - -jobs: - include: - - stage: Code and Commit Formatting and Integration Tests - node_js: "11" - script: - - commitlint-travis - - yarn check-format - - yarn integration-tests diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 167800e91297..ffc9182f80c0 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -17,18 +17,23 @@ jobs: # bootstrap yarn --ignore-engines --frozen-lockfile - # - script: | - # yarn check-format - # displayName: 'Check code formatting' + - script: | + yarn check-format + displayName: 'Check code formatting' - # - script: | - # yarn test - # displayName: 'Run unit tests' + - script: | + yarn test + displayName: 'Run unit tests' - script: | yarn integration-tests displayName: 'Run integrations tests' + - script: | + yarn global add codecov + codecov + displayName: 'Publish code coverage report' + - job: unit_tests_on_other_node_versions displayName: Run unit tests on other Node.js versions pool: From 4e7b0f301fb4b9118d61e935f77735af3ab799ae Mon Sep 17 00:00:00 2001 From: James Henry Date: Sun, 20 Jan 2019 19:20:42 -0500 Subject: [PATCH 13/17] build: try npx for codecov --- azure-pipelines.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ffc9182f80c0..8cd91466e6db 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -30,8 +30,7 @@ jobs: displayName: 'Run integrations tests' - script: | - yarn global add codecov - codecov + npx codecov displayName: 'Publish code coverage report' - job: unit_tests_on_other_node_versions From e1c6bb233cab34bbb0c47bd3e64cd4f8e474b456 Mon Sep 17 00:00:00 2001 From: James Henry Date: Sun, 20 Jan 2019 19:35:39 -0500 Subject: [PATCH 14/17] build: add codecov token --- .codecov.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.codecov.yml b/.codecov.yml index 750d876773d3..598ea34a02c2 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -1,3 +1,5 @@ +codecov: + token: 36f54445-cf11-44dc-b17f-182451b8f60e coverage: status: patch: From 9c9302d85f73991ab3593afb5a4423797a0f1e06 Mon Sep 17 00:00:00 2001 From: James Henry Date: Sun, 20 Jan 2019 19:44:32 -0500 Subject: [PATCH 15/17] build: replace old codecov token, set secret --- .codecov.yml | 2 -- azure-pipelines.yml | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.codecov.yml b/.codecov.yml index 598ea34a02c2..750d876773d3 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -1,5 +1,3 @@ -codecov: - token: 36f54445-cf11-44dc-b17f-182451b8f60e coverage: status: patch: diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 8cd91466e6db..8c67ef5d758f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -30,7 +30,7 @@ jobs: displayName: 'Run integrations tests' - script: | - npx codecov + npx codecov -t $(codecovToken) displayName: 'Publish code coverage report' - job: unit_tests_on_other_node_versions From 12d4b7a7e9545749042e9710b6ca9879f44aa974 Mon Sep 17 00:00:00 2001 From: James Henry Date: Sun, 20 Jan 2019 19:55:13 -0500 Subject: [PATCH 16/17] build: remove -t --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 8c67ef5d758f..8cd91466e6db 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -30,7 +30,7 @@ jobs: displayName: 'Run integrations tests' - script: | - npx codecov -t $(codecovToken) + npx codecov displayName: 'Publish code coverage report' - job: unit_tests_on_other_node_versions From 275ff1d6588a5756e0ea4de677cf19b5f05d298d Mon Sep 17 00:00:00 2001 From: James Henry Date: Sun, 20 Jan 2019 19:56:52 -0500 Subject: [PATCH 17/17] build: -t $(CODECOV_TOKEN) --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 8cd91466e6db..63512b1f85ad 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -30,7 +30,7 @@ jobs: displayName: 'Run integrations tests' - script: | - npx codecov + npx codecov -t $(CODECOV_TOKEN) displayName: 'Publish code coverage report' - job: unit_tests_on_other_node_versions