From b87030655dcaa315bf750c81cbd2b4e21a0f7bcf Mon Sep 17 00:00:00 2001 From: Will Smythe Date: Thu, 2 May 2019 18:07:55 -0400 Subject: [PATCH] Simplify workaround that overrides Jest clone folder on Azure Pipelines (#8413) --- .azure-pipelines-steps.yml | 16 +++------------- .azure-pipelines.yml | 4 ---- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/.azure-pipelines-steps.yml b/.azure-pipelines-steps.yml index 7fd184534620..56f25e676cf8 100644 --- a/.azure-pipelines-steps.yml +++ b/.azure-pipelines-steps.yml @@ -2,9 +2,9 @@ # Steps for building and testing Jest. See jobs defined in .azure-pipelines.yml # -# Clones the repo steps: - checkout: self + path: jest # Ensure Node.js 10 is active - task: NodeTool@0 @@ -18,34 +18,24 @@ steps: versionSpec: '2.7' displayName: 'Use Python 2.7' - # Workaround to move source files under a "jest" folder (see .azure-pipelines.yml for details) - - script: | - cd / - mv $(Build.Repository.LocalPath) $(JEST_DIR) - mkdir $(Build.Repository.LocalPath) - displayName: 'Move source into jest folder' - # Run yarn to install dependencies and build - script: node scripts/remove-postinstall - workingDirectory: $(JEST_DIR) displayName: 'Remove postinstall script' + - script: yarn --no-progress --frozen-lockfile - workingDirectory: $(JEST_DIR) displayName: 'Install dependencies' + - script: node scripts/build - workingDirectory: $(JEST_DIR) displayName: 'Build' # Run test-ci-partial - script: yarn run test-ci-partial - workingDirectory: $(JEST_DIR) displayName: 'Run tests' # Publish CI test results - task: PublishTestResults@2 inputs: testResultsFiles: '**/reports/junit/*.xml' - searchFolder: $(JEST_DIR) testRunTitle: 'CI Tests $(Agent.OS)' displayName: 'Publish test results' condition: succeededOrFailed() diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index e28f5b54627b..6bf1e00454ab 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -32,9 +32,5 @@ variables: # Used by chalk. Ensures output from Jest includes ANSI escape characters that are needed to match test snapshots. FORCE_COLOR: 1 - # By default, Azure Pipelines clones to an "s" directory, which causes tests to fail due to assumption of Jest being run from a "jest" directory. - # See packages/jest-message-util/src/index.js PATH_JEST_PACKAGES for more details. - JEST_DIR: $(Agent.BuildDirectory)/jest - # Ensures the handful of tests that should be skipped during CI are CI: true