Skip to content

Commit

Permalink
remove allowlist, only use denylist, enable newly passing tests (verc…
Browse files Browse the repository at this point in the history
…el#50325)

### What?

* remove allowlist
* add script to print enabled test cases
* enable test suites that turbopack is newly passing
  • Loading branch information
sokra authored and hydRAnger committed Jun 12, 2023
1 parent 85067fb commit 0106e9d
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 349 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_test_deploy.yml
Expand Up @@ -932,7 +932,7 @@ jobs:
strategy:
fail-fast: false
matrix:
group: [1, 2, 3, 4, 5]
group: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
steps:
- run: echo "${{needs.build.outputs.docsChange}}"

Expand All @@ -954,7 +954,7 @@ jobs:
name: next-swc-test-binary
path: packages/next-swc/native

- run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-jammy /bin/bash -c "cd /work && NODE_VERSION=${{ env.NODE_LTS_VERSION }} ./scripts/setup-node.sh && npm i -g pnpm@${PNPM_VERSION} > /dev/null && NEXT_EXTERNAL_TESTS_FILTERS=${NEXT_EXTERNAL_TESTS_FILTERS} __INTERNAL_NEXT_DEV_TEST_TURBO_DEV=TRUE __INTERNAL_CUSTOM_TURBOPACK_BINDINGS=${NEXT_BINDINGS_BIN} __INTERNAL_NEXT_DEV_TEST_TURBO_GLOB_MATCH=${NEXT_DEV_TEST_GLOB} NEXT_E2E_TEST_TIMEOUT=240000 NEXT_TEST_JOB=1 TEST_TIMINGS_TOKEN=${{ secrets.TEST_TIMINGS_TOKEN }} xvfb-run node run-tests.js --timings -g ${{ matrix.group }}/5 >> /proc/1/fd/1"
- run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-jammy /bin/bash -c "cd /work && NODE_VERSION=${{ env.NODE_LTS_VERSION }} ./scripts/setup-node.sh && npm i -g pnpm@${PNPM_VERSION} > /dev/null && NEXT_EXTERNAL_TESTS_FILTERS=${NEXT_EXTERNAL_TESTS_FILTERS} __INTERNAL_NEXT_DEV_TEST_TURBO_DEV=TRUE __INTERNAL_CUSTOM_TURBOPACK_BINDINGS=${NEXT_BINDINGS_BIN} __INTERNAL_NEXT_DEV_TEST_TURBO_GLOB_MATCH=${NEXT_DEV_TEST_GLOB} NEXT_E2E_TEST_TIMEOUT=240000 NEXT_TEST_JOB=1 TEST_TIMINGS_TOKEN=${{ secrets.TEST_TIMINGS_TOKEN }} xvfb-run node run-tests.js --timings -g ${{ matrix.group }}/10 >> /proc/1/fd/1"
if: ${{needs.build.outputs.docsChange == 'nope'}}

- name: Upload test trace
Expand Down
30 changes: 30 additions & 0 deletions packages/next-swc/crates/next-dev-tests/print-enabled-tests.js
@@ -0,0 +1,30 @@
/// A script that prints a list of test cases that are enabled

const _glob = require('glob')
const { promisify } = require('util')
const glob = promisify(_glob)
const path = require('path')

const { disabledTests } = require('./tests-manifest.js')

const main = async () => {
// Collect all test files
const testFiles = new Set(
(
await glob('**/*.test.{js,ts,tsx}', {
nodir: true,
cwd: path.resolve(__dirname, '../../../../test'),
})
).map((file) => `test/${file}`)
)

for (const testFile of disabledTests) {
testFiles.delete(testFile)
}

for (const testFile of testFiles) {
console.log(testFile)
}
}

main().catch((e) => console.error(e))
65 changes: 0 additions & 65 deletions packages/next-swc/crates/next-dev-tests/sync-tests-manifest.js

This file was deleted.

0 comments on commit 0106e9d

Please sign in to comment.