diff --git a/.github/workflows/nightly-tests.yml b/.github/workflows/nightly-tests.yml index 3843bda357..88f460dc19 100644 --- a/.github/workflows/nightly-tests.yml +++ b/.github/workflows/nightly-tests.yml @@ -26,7 +26,6 @@ jobs: 'current' # newest ] no-lockfile: ['false', 'true'] - name: "Tests [Node.js ${{ matrix.node-version }}, ${{ matrix.runs-on }}, ${{ matrix.no-lockfile == 'false' && 'Using yarn.lock' || 'Ignoring yarn.lock' }}]" uses: ./.github/workflows/test.yml with: node-version: ${{ matrix.node-version }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7da3ddc69b..2244cc1b1e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,3 +27,5 @@ jobs: no-lockfile: ${{ inputs.no-lockfile }} - name: Run Jest Tests run: yarn jest --ci --maxWorkers 4 --reporters=default --reporters=jest-junit --rootdir='./' + env: + NIGHTLY_TESTS_NO_LOCKFILE: ${{ inputs.no-lockfile }} diff --git a/jest.config.js b/jest.config.js index c8021801dc..0388347ad0 100644 --- a/jest.config.js +++ b/jest.config.js @@ -9,6 +9,12 @@ */ module.exports = function jestConfig() { + const testPathIgnorePatterns = []; + if (process.env.NIGHTLY_TESTS_NO_LOCKFILE) { + // flaky babel types test - this should be removed once babel is updated + testPathIgnorePatterns.push('__tests__/babel-lib-defs-test.js'); + } + /** @type {import('jest').Config} **/ const config = { modulePathIgnorePatterns: ['/node_modules/', 'packages/[^/]+/build/'], @@ -18,6 +24,7 @@ module.exports = function jestConfig() { }, testEnvironment: 'node', testRegex: '/__tests__/.*-test\\.js$', + testPathIgnorePatterns, fakeTimers: { enableGlobally: true, legacyFakeTimers: false,