From 7669204ee5eb64534c4ba051f97a39d268b2d8a5 Mon Sep 17 00:00:00 2001 From: Pablo Nunez Navarro Date: Tue, 13 Nov 2018 16:38:42 +0100 Subject: [PATCH 1/6] Increase timeout in Windows, we're seeing tests failing randomly and others close to default 5 sec. --- packages/pkg-tests/yarn.test.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/pkg-tests/yarn.test.js b/packages/pkg-tests/yarn.test.js index 284b57ee61..ca5c274a1c 100644 --- a/packages/pkg-tests/yarn.test.js +++ b/packages/pkg-tests/yarn.test.js @@ -66,6 +66,10 @@ const pkgDriver = generatePkgDriver({ }, }); +if (process.platform === `win32`) { + jest.setTimeout(10000); +} + beforeEach(async () => { await startPackageServer(); await getPackageRegistry(); From faeb61c0341a826a09a1f31263cc394c37b09269 Mon Sep 17 00:00:00 2001 From: Pablo Nunez Navarro Date: Tue, 13 Nov 2018 17:10:53 +0100 Subject: [PATCH 2/6] Distinguish tests published from each job. --- scripts/azure-run-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/azure-run-tests.yml b/scripts/azure-run-tests.yml index 30450c338b..5f22975e2b 100644 --- a/scripts/azure-run-tests.yml +++ b/scripts/azure-run-tests.yml @@ -25,5 +25,6 @@ steps: - task: PublishTestResults@2 inputs: testResultsFiles: '**/junit.xml' + testRunTitle: $(vmImage) Node $(node_version) displayName: 'Publishing the test results' condition: always() From 8b1d840884fc0cb465ba00cd01bc960b45dd7b09 Mon Sep 17 00:00:00 2001 From: Pablo Nunez Navarro Date: Tue, 13 Nov 2018 17:32:46 +0100 Subject: [PATCH 3/6] Pass name as vmImage is not available --- azure-pipelines.yml | 6 ++++++ scripts/azure-run-tests.yml | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ba335375cc..711ebc18be 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -12,6 +12,8 @@ jobs: steps: - template: scripts/azure-run-tests.yml + parameters: + name: Windows - job: Linux pool: @@ -26,6 +28,8 @@ jobs: steps: - template: scripts/azure-run-tests.yml + parameters: + name: Linux - job: OSX pool: @@ -40,3 +44,5 @@ jobs: steps: - template: scripts/azure-run-tests.yml + parameters: + name: OSX \ No newline at end of file diff --git a/scripts/azure-run-tests.yml b/scripts/azure-run-tests.yml index 5f22975e2b..810b95b540 100644 --- a/scripts/azure-run-tests.yml +++ b/scripts/azure-run-tests.yml @@ -1,3 +1,6 @@ +parameters: + name: '' + steps: - task: NodeTool@0 @@ -25,6 +28,6 @@ steps: - task: PublishTestResults@2 inputs: testResultsFiles: '**/junit.xml' - testRunTitle: $(vmImage) Node $(node_version) + testRunTitle: ${{ parameters.name }} Node $(node_version) displayName: 'Publishing the test results' condition: always() From c3920455112a89665aa34dc1390ddb246241d144 Mon Sep 17 00:00:00 2001 From: Pablo Nunez Navarro Date: Wed, 14 Nov 2018 09:42:42 +0100 Subject: [PATCH 4/6] Remove unnecessary detect unfinished tests. --- scripts/azure-run-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/azure-run-tests.yml b/scripts/azure-run-tests.yml index 810b95b540..5b7681fb83 100644 --- a/scripts/azure-run-tests.yml +++ b/scripts/azure-run-tests.yml @@ -22,7 +22,7 @@ steps: - script: | cd packages/pkg-tests - yarn jest yarn --detectOpenHandles --reporters=default --reporters=jest-junit + yarn jest yarn --reporters=default --reporters=jest-junit displayName: 'Run the acceptance tests' - task: PublishTestResults@2 From dbaa7458050da6381c122358fab417fd42d665f4 Mon Sep 17 00:00:00 2001 From: Pablo Nunez Navarro Date: Wed, 14 Nov 2018 11:19:17 +0100 Subject: [PATCH 5/6] Using strategy var instead of parameter --- azure-pipelines.yml | 14 +++++++------- scripts/azure-run-tests.yml | 5 +---- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 711ebc18be..1954bb5d6c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -7,13 +7,13 @@ jobs: matrix: node_8_x: node_version: 8.x + os_name: Windows node_10_x: node_version: 10.x + os_name: Windows steps: - template: scripts/azure-run-tests.yml - parameters: - name: Windows - job: Linux pool: @@ -23,13 +23,13 @@ jobs: matrix: node_8_x: node_version: 8.x + os_name: Linux node_10_x: node_version: 10.x + os_name: Linux steps: - template: scripts/azure-run-tests.yml - parameters: - name: Linux - job: OSX pool: @@ -39,10 +39,10 @@ jobs: matrix: node_8_x: node_version: 8.x + os_name: OSX node_10_x: node_version: 10.x + os_name: OSX steps: - - template: scripts/azure-run-tests.yml - parameters: - name: OSX \ No newline at end of file + - template: scripts/azure-run-tests.yml \ No newline at end of file diff --git a/scripts/azure-run-tests.yml b/scripts/azure-run-tests.yml index 5b7681fb83..45e105d047 100644 --- a/scripts/azure-run-tests.yml +++ b/scripts/azure-run-tests.yml @@ -1,6 +1,3 @@ -parameters: - name: '' - steps: - task: NodeTool@0 @@ -28,6 +25,6 @@ steps: - task: PublishTestResults@2 inputs: testResultsFiles: '**/junit.xml' - testRunTitle: ${{ parameters.name }} Node $(node_version) + testRunTitle: $(os_name) Node $(node_version) displayName: 'Publishing the test results' condition: always() From 33312530a10550a1f9f0cb712d9488695aea3aea Mon Sep 17 00:00:00 2001 From: Pablo Nunez Navarro Date: Wed, 14 Nov 2018 11:32:11 +0100 Subject: [PATCH 6/6] Use variables instead of strategy --- azure-pipelines.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1954bb5d6c..c625c8a030 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -3,14 +3,15 @@ jobs: - job: Windows pool: 'Hosted VS2017' + variables: + os_name: Windows + strategy: matrix: node_8_x: node_version: 8.x - os_name: Windows node_10_x: node_version: 10.x - os_name: Windows steps: - template: scripts/azure-run-tests.yml @@ -19,14 +20,15 @@ jobs: pool: vmImage: 'Ubuntu 16.04' + variables: + os_name: Linux + strategy: matrix: node_8_x: node_version: 8.x - os_name: Linux node_10_x: node_version: 10.x - os_name: Linux steps: - template: scripts/azure-run-tests.yml @@ -35,14 +37,15 @@ jobs: pool: vmImage: 'macOS 10.13' + variables: + os_name: OSX + strategy: matrix: node_8_x: node_version: 8.x - os_name: OSX node_10_x: node_version: 10.x - os_name: OSX steps: - template: scripts/azure-run-tests.yml \ No newline at end of file