Skip to content

Commit

Permalink
Merge branch 'feat-async-setupFiles' of https://github.com/mrazauskas…
Browse files Browse the repository at this point in the history
…/jest into feat-async-setupFiles
  • Loading branch information
mrazauskas committed Feb 25, 2022
2 parents 3ee2adf + 24d3ffb commit 3ec5ed9
Show file tree
Hide file tree
Showing 1,052 changed files with 22,800 additions and 46,156 deletions.
46 changes: 46 additions & 0 deletions .azure-pipelines-steps.yml
@@ -0,0 +1,46 @@
#
# Steps for building and testing Jest. See jobs defined in .azure-pipelines.yml
#

steps:
- checkout: self
path: jest

# Ensure Node.js 14 is active
- task: NodeTool@0
inputs:
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'

- bash: echo "##vso[task.setvariable variable=folder;isOutput=true]$(yarn config get cacheFolder)"
name: yarnCache

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

- 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'

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

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

- job: Windows
pool:
vmImage: windows-latest
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-latest
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
28 changes: 23 additions & 5 deletions .circleci/config.yml
Expand Up @@ -12,22 +12,34 @@ aliases:
app-dir: ~/jest

orbs:
node: circleci/node@5.0.0
node: circleci/node@4.7.0

jobs:
test-node:
parameters:
node-version:
type: string
partial:
type: boolean
default: false
working_directory: ~/jest
executor: node/default
steps:
- checkout
- node/install:
node-version: << parameters.node-version >>
install-npm: false
- node/install-packages: *install
- run:
command: yarn test-ci-partial
- when:
condition: << parameters.partial >>
steps:
- run:
command: yarn test-ci-partial
- unless:
condition: << parameters.partial >>
steps:
- run:
command: yarn test-ci
- store_test_results:
path: reports/junit

Expand All @@ -37,7 +49,8 @@ jobs:
steps:
- checkout
- node/install:
node-version: lts/*
node-version: '14'
install-npm: false
- node/install-packages: *install
- run:
command: JEST_JASMINE=1 yarn test-ci-partial && JEST_JASMINE=1 yarn test-leak
Expand All @@ -48,9 +61,14 @@ jobs:
workflows:
build-and-deploy:
jobs:
- test-node:
matrix:
parameters:
node-version: ['14']
- test-node:
name: test-node-partial-<< matrix.node-version >>
partial: true
matrix:
parameters:
node-version: ['12', '14', '16', '17']
node-version: ['10', '12', '15', '16', '17']
- test-jest-jasmine
13 changes: 0 additions & 13 deletions .codecov.yml

This file was deleted.

1 change: 0 additions & 1 deletion .eslintignore
Expand Up @@ -3,7 +3,6 @@
bin/
flow-typed/**
packages/*/build/**
packages/*/dist/**
packages/jest-diff/src/cleanupSemantic.ts
website/.docusaurus
website/blog
Expand Down
8 changes: 2 additions & 6 deletions .eslintplugin/index.js
Expand Up @@ -9,10 +9,6 @@ exports.rules = {
'ban-types-eventually': require('@typescript-eslint/eslint-plugin').rules[
'ban-types'
],
'prefer-rest-params-eventually':
require('eslint/use-at-your-own-risk').builtinRules.get(
'prefer-rest-params',
),
'prefer-spread-eventually':
require('eslint/use-at-your-own-risk').builtinRules.get('prefer-spread'),
'prefer-rest-params-eventually': require('eslint/lib/rules/prefer-rest-params'),
'prefer-spread-eventually': require('eslint/lib/rules/prefer-spread'),
};

0 comments on commit 3ec5ed9

Please sign in to comment.