Skip to content

Commit

Permalink
Merge branch 'master' into do-not-trigger-tests-on-atime-change
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Nov 9, 2019
2 parents 340d65c + 62dfcc9 commit 4d4b2fd
Show file tree
Hide file tree
Showing 2,659 changed files with 291,471 additions and 140,056 deletions.
44 changes: 44 additions & 0 deletions .azure-pipelines-steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#
# Steps for building and testing Jest. See jobs defined in .azure-pipelines.yml
#

steps:
- checkout: self
path: jest

# Ensure Node.js 10 is active
- task: NodeTool@0
inputs:
versionSpec: '12.x'
displayName: 'Use Node.js 12'

# Ensure Python 2.7 is active
- task: UsePythonVersion@0
inputs:
versionSpec: '2.7'
displayName: 'Use Python 2.7'

# Run yarn to install dependencies and build
- script: node scripts/remove-postinstall
displayName: 'Remove postinstall script'

- task: CacheBeta@0
inputs:
key: yarn | $(Agent.OS) | yarn.lock
path: $(YARN_CACHE_FOLDER)
displayName: Cache Yarn packages

- script: yarn install-no-ts-build
displayName: 'Install dependencies'

# Run test-ci-partial
- script: yarn run test-ci-partial
displayName: 'Run tests'

# Publish CI test results
- task: PublishTestResults@2
inputs:
testResultsFiles: '**/reports/junit/*.xml'
testRunTitle: 'CI Tests $(Agent.OS)'
displayName: 'Publish test results'
condition: succeededOrFailed()
38 changes: 38 additions & 0 deletions .azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#
# Azure Pipelines configuration for building and testing Jest on Linux, Windows, and macOS.
#

jobs:
- job: Linux
pool:
vmImage: ubuntu-16.04
steps:
- template: .azure-pipelines-steps.yml

- job: Windows
pool:
vmImage: vs2017-win2016
steps:
- script: |
git config --global core.autocrlf false
git config --global core.symlinks true
displayName: 'Preserve LF endings and symbolic links on check out'
- template: .azure-pipelines-steps.yml

- job: macOS
pool:
vmImage: macos-10.13
steps:
# This step can be removed once Mercurial gets installed on the macOS image. See https://github.com/Microsoft/azure-pipelines-image-generation/issues/604
- script: HOMEBREW_NO_AUTO_UPDATE=1 brew install mercurial
displayName: 'Install Mercurial'
- template: .azure-pipelines-steps.yml

variables:
# Used by chalk. Ensures output from Jest includes ANSI escape characters that are needed to match test snapshots.
FORCE_COLOR: 1

# Ensures the handful of tests that should be skipped during CI are
CI: true

YARN_CACHE_FOLDER: $(Pipeline.Workspace)/.yarn
13 changes: 0 additions & 13 deletions .babelrc

This file was deleted.

57 changes: 36 additions & 21 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,36 @@ aliases:
- &filter-ignore-gh-pages
branches:
ignore: gh-pages
- &install yarn install-no-ts-build

version: 2
jobs:
lint-and-typecheck:
working_directory: ~/jest
docker:
- image: circleci/node:10
- image: circleci/node:12
steps:
- checkout
- restore-cache: *restore-cache
- run: yarn --no-progress
- run: yarn --no-progress --frozen-lockfile
- save-cache: *save-cache
- run: yarn lint --format junit -o reports/junit/js-lint-results.xml && yarn typecheck && yarn lint-es5-build --format junit -o reports/junit/js-es5-lint-results.xml && yarn lint:md:ci
- run: yarn lint --format junit -o reports/junit/js-lint-results.xml && yarn lint-es5-build --format junit -o reports/junit/js-es5-lint-results.xml && yarn lint:prettier:ci && yarn check-copyright-headers
- store_test_results:
path: reports/junit

test-browser:
test-node-8:
working_directory: ~/jest
docker:
- image: circleci/node:8-browsers
- image: circleci/node:8
steps:
- checkout
- restore-cache: *restore-cache
- run: yarn --no-progress
- run: *install
- save-cache: *save-cache
- run: yarn test-ci-es5-build-in-browser
- run:
command: yarn test-ci-partial
- store_test_results:
path: reports/junit

test-node-10:
working_directory: ~/jest
Expand All @@ -48,7 +52,7 @@ jobs:
steps:
- checkout
- restore-cache: *restore-cache
- run: yarn --no-progress
- run: *install
- save-cache: *save-cache
- run:
command: yarn test-ci-partial
Expand All @@ -58,55 +62,65 @@ jobs:
test-jest-circus:
working_directory: ~/jest
docker:
- image: circleci/node:10
- image: circleci/node:12
steps:
- checkout
- restore-cache: *restore-cache
- run: yarn --no-progress
- run: *install
- save-cache: *save-cache
- run:
command: JEST_CIRCUS=1 yarn test-ci-partial
- store_test_results:
path: reports/junit

test-node-8:
test-node-12:
working_directory: ~/jest
docker:
- image: circleci/node:8
- image: circleci/node:12
steps:
- checkout
- restore-cache: *restore-cache
- run: yarn --no-progress
- run: *install
- save-cache: *save-cache
- run:
command: yarn test-ci
- store_test_results:
path: reports/junit

test-node-6:
test-node-13:
working_directory: ~/jest
docker:
- image: circleci/node:6
- image: circleci/node:13
steps:
- checkout
- restore-cache: *restore-cache
- run: yarn --no-progress --ignore-engines
- run: *install
- save-cache: *save-cache
- run:
# react-native does not work with node 6
command: rm -rf examples/react-native && yarn test-ci-partial
command: yarn test-ci-partial
- store_test_results:
path: reports/junit

test-browser:
working_directory: ~/jest
docker:
- image: circleci/node:12-browsers
steps:
- checkout
- restore-cache: *restore-cache
- run: *install
- save-cache: *save-cache
- run: yarn test-ci-es5-build-in-browser

test-or-deploy-website:
working_directory: ~/jest
docker:
- image: circleci/node:8
- image: circleci/node:12
resource_class: large
steps:
- checkout
- restore-cache: *restore-cache
- run: yarn --no-progress
- run: *install
- save-cache: *save-cache
- run:
name: Test or Deploy Jest Website
Expand All @@ -119,8 +133,9 @@ workflows:
jobs:
- lint-and-typecheck
- test-node-8
- test-node-6
- test-node-10
- test-node-12
- test-node-13 # current
- test-jest-circus
- test-browser
- test-or-deploy-website:
Expand Down
6 changes: 5 additions & 1 deletion .circleci/website.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ else
sudo dpkg -i crowdin.deb
# translations upload/download
yarn crowdin-upload
yarn crowdin-download
# download only enabled languages
for lang in ja es-ES ro zh-CN pt-BR ru uk
do
yarn crowdin-download -l $lang
done
# build and publish website
GIT_USER=docusaurus-bot USE_SSH=false yarn publish-gh-pages
else
Expand Down
10 changes: 9 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org
#
# Some of these options are also respected by Prettier

root = true

[*]
indent_style = space
indent_size = 2

end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[{*.md,*.snap}]
[*.{md,snap}]
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ bin/
flow-typed/**
packages/*/build/**
packages/*/build-es5/**
packages/jest-diff/src/cleanupSemantic.ts
website/blog
website/build
website/node_modules
Expand Down
Loading

0 comments on commit 4d4b2fd

Please sign in to comment.