Skip to content

Commit

Permalink
Merge branch 'master' into jest-each-heading-validation
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Dec 5, 2020
2 parents 2f75fb8 + 460306c commit 61bb0d0
Show file tree
Hide file tree
Showing 1,011 changed files with 56,021 additions and 180,803 deletions.
20 changes: 11 additions & 9 deletions .azure-pipelines-steps.yml
Expand Up @@ -6,31 +6,33 @@ steps:
- checkout: self
path: jest

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

# 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'
- bash: echo "##vso[task.setvariable variable=folder;isOutput=true]$(yarn config get cacheFolder)"
name: yarnCache

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

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

- script: yarn build:js
displayName: 'Transpile TypeScript'

# Run test-ci-partial
- script: yarn run test-ci-partial
displayName: 'Run tests'
Expand Down
2 changes: 0 additions & 2 deletions .azure-pipelines.yml
Expand Up @@ -34,5 +34,3 @@ variables:

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

YARN_CACHE_FOLDER: $(Pipeline.Workspace)/.yarn
101 changes: 48 additions & 53 deletions .circleci/config.yml
@@ -1,103 +1,98 @@
aliases:
- &restore-cache
keys:
- v2-dependencies-{{ .Branch }}-{{ checksum "yarn.lock" }}
# Fallback in case checksum fails
- v2-dependencies-{{ .Branch }}-

- &save-cache
paths:
- node_modules
- website/node_modules
key: v2-dependencies-{{ .Branch }}-{{ checksum "yarn.lock" }}

- &filter-ignore-gh-pages
branches:
ignore: gh-pages
- &install yarn install-no-ts-build
- &install
pkg-manager: yarn
override-ci-command: yarn install --immutable && yarn build:js
cache-path: ~/.yarn/berry/cache
include-branch-in-cache-key: false
app-dir: ~/jest

version: 2
orbs:
node: circleci/node@4.0.0
version: 2.1
jobs:
test-node-10:
working_directory: ~/jest
docker:
- image: circleci/node:10
executor: node/default
steps:
- checkout
- restore-cache: *restore-cache
- run: *install
- save-cache: *save-cache
- node/install:
node-version: '10'
install-npm: false
- node/install-packages: *install
- run:
command: yarn test-ci-partial
- store_test_results:
path: reports/junit

test-jest-circus:
test-jest-jasmine:
working_directory: ~/jest
docker:
- image: circleci/node:12
executor: node/default
steps:
- checkout
- restore-cache: *restore-cache
- run: *install
- save-cache: *save-cache
- node/install:
lts: true
install-npm: false
- node/install-packages: *install
- run:
command: JEST_CIRCUS=1 yarn test-ci-partial && JEST_CIRCUS=1 yarn test-leak
command: JEST_JASMINE=1 yarn test-ci-partial && JEST_JASMINE=1 yarn test-leak
- store_test_results:
path: reports/junit

test-node-12:
working_directory: ~/jest
docker:
- image: circleci/node:12
executor: node/default
steps:
- checkout
- restore-cache: *restore-cache
- run: *install
- save-cache: *save-cache
- node/install:
node-version: '12'
install-npm: false
- node/install-packages: *install
- run:
command: yarn test-ci
command: yarn test-ci-partial
- store_test_results:
path: reports/junit

test-node-13:
test-node-14:
working_directory: ~/jest
docker:
- image: circleci/node:13
executor: node/default
steps:
- checkout
- restore-cache: *restore-cache
- run: *install
- save-cache: *save-cache
- node/install:
node-version: '14'
install-npm: false
- node/install-packages: *install
- run:
command: yarn test-ci-partial
command: yarn test-ci
- store_test_results:
path: reports/junit

test-node-14:
test-node-15:
working_directory: ~/jest
docker:
- image: circleci/node:14
executor: node/default
steps:
- checkout
- restore-cache: *restore-cache
- run: *install
- save-cache: *save-cache
- node/install:
node-version: '15'
install-npm: false
- node/install-packages: *install
- run:
command: yarn test-ci-partial
- store_test_results:
path: reports/junit

test-or-deploy-website:
working_directory: ~/jest
docker:
- image: circleci/node:12
executor: node/default
resource_class: large
steps:
- checkout
- restore-cache: *restore-cache
- run: *install
- save-cache: *save-cache
- node/install:
lts: true
install-npm: false
- node/install-packages: *install
- run:
name: Test or Deploy Jest Website
command: ./.circleci/website.sh
Expand All @@ -109,8 +104,8 @@ workflows:
jobs:
- test-node-10
- test-node-12
- test-node-13
- test-node-14 # current
- test-jest-circus
- test-node-14
- test-node-15 # current
- test-jest-jasmine
- test-or-deploy-website:
filters: *filter-ignore-gh-pages
4 changes: 2 additions & 2 deletions .circleci/website.sh
Expand Up @@ -13,7 +13,7 @@ else
git config --global user.name "Website Deployment Script"
echo "machine github.com login docusaurus-bot password $DOCUSAURUS_PUBLISH_TOKEN" > ~/.netrc
# install Docusaurus and generate file of English strings
yarn && cd website && node fetchSupporters.js && yarn write-translations
yarn --immutable && cd website && node fetchSupporters.js && yarn write-translations
# crowdin install
sudo apt-get update
sudo apt-get install default-jre rsync
Expand All @@ -30,6 +30,6 @@ else
GIT_USER=docusaurus-bot USE_SSH=false yarn publish-gh-pages
else
echo "Skipping deploy. Test website build"
cd website && yarn && node fetchSupporters.js && yarn build
yarn --immutable && cd website && node fetchSupporters.js && yarn build
fi
fi
14 changes: 14 additions & 0 deletions .eslintplugin/index.js
@@ -0,0 +1,14 @@
/**
* Copyright (c) 2016-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

exports.rules = {
'ban-types-eventually': require('@typescript-eslint/eslint-plugin').rules[
'ban-types'
],
'prefer-rest-params-eventually': require('eslint/lib/rules/prefer-rest-params'),
'prefer-spread-eventually': require('eslint/lib/rules/prefer-spread'),
};

0 comments on commit 61bb0d0

Please sign in to comment.