Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify workaround that overrides Jest clone folder on Azure Pipelines #8413

Merged
merged 1 commit into from
May 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions .azure-pipelines-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
4 changes: 0 additions & 4 deletions .azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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