Skip to content

Commit b870306

Browse files
willsmythejeysal
authored andcommitted
Simplify workaround that overrides Jest clone folder on Azure Pipelines (#8413)
1 parent 1c5d830 commit b870306

File tree

2 files changed

+3
-17
lines changed

2 files changed

+3
-17
lines changed

.azure-pipelines-steps.yml

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
# Steps for building and testing Jest. See jobs defined in .azure-pipelines.yml
33
#
44

5-
# Clones the repo
65
steps:
76
- checkout: self
7+
path: jest
88

99
# Ensure Node.js 10 is active
1010
- task: NodeTool@0
@@ -18,34 +18,24 @@ steps:
1818
versionSpec: '2.7'
1919
displayName: 'Use Python 2.7'
2020

21-
# Workaround to move source files under a "jest" folder (see .azure-pipelines.yml for details)
22-
- script: |
23-
cd /
24-
mv $(Build.Repository.LocalPath) $(JEST_DIR)
25-
mkdir $(Build.Repository.LocalPath)
26-
displayName: 'Move source into jest folder'
27-
2821
# Run yarn to install dependencies and build
2922
- script: node scripts/remove-postinstall
30-
workingDirectory: $(JEST_DIR)
3123
displayName: 'Remove postinstall script'
24+
3225
- script: yarn --no-progress --frozen-lockfile
33-
workingDirectory: $(JEST_DIR)
3426
displayName: 'Install dependencies'
27+
3528
- script: node scripts/build
36-
workingDirectory: $(JEST_DIR)
3729
displayName: 'Build'
3830

3931
# Run test-ci-partial
4032
- script: yarn run test-ci-partial
41-
workingDirectory: $(JEST_DIR)
4233
displayName: 'Run tests'
4334

4435
# Publish CI test results
4536
- task: PublishTestResults@2
4637
inputs:
4738
testResultsFiles: '**/reports/junit/*.xml'
48-
searchFolder: $(JEST_DIR)
4939
testRunTitle: 'CI Tests $(Agent.OS)'
5040
displayName: 'Publish test results'
5141
condition: succeededOrFailed()

.azure-pipelines.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,5 @@ variables:
3232
# Used by chalk. Ensures output from Jest includes ANSI escape characters that are needed to match test snapshots.
3333
FORCE_COLOR: 1
3434

35-
# 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.
36-
# See packages/jest-message-util/src/index.js PATH_JEST_PACKAGES for more details.
37-
JEST_DIR: $(Agent.BuildDirectory)/jest
38-
3935
# Ensures the handful of tests that should be skipped during CI are
4036
CI: true

0 commit comments

Comments
 (0)