Unverified Commit 3dd7baa5 authored by Jamiboy Mohammad's avatar Jamiboy Mohammad Committed by GitHub

test: enable deploy-excluded suites verified against deployments (#100484)

## Summary

Removes the deploy exclusion from eight suites and one describe block
that pass against real Vercel deployments:

- `app-dir/next-font`: also drops its `@next/font: 'workspace:*'`
dependency. Nothing has resolved `@next/font` since #65601 and the
fixture only imports `next/font/local`, but the package is private, so
CI deploy jobs failed with a 404 installing it from the preview
tarballs.
- `app-dir/self-importing-package`
- `i18n-data-fetching-redirect/redirect`
- `relay-graphql-swc-multi-project` (both `project-a` and `project-b`;
the existing `isNextDeploy ? it.skip` on the generated-types check
stays)
- `ssg-dynamic-routes-404-page`
- `switchable-runtime`
- `trailingslash-with-rewrite`
- `transpile-packages`: drops both in-file deploy early returns,
including a stale one about React 17
- `next-image-legacy/default` Static Image Component Tests: a leftover
gate that only preserved the sibling Build Error describe's old
`skipDeployment` focus. It passed 7/7 in the deploy job of [run
36052929022](https://github.com/vercel/next.js/actions/runs/36052929022)
(#99187, Sept 24); the sibling's own gate now also skips its hooks
(#98169). Not re-run locally.

Four of these (`next-font`, `self-importing-package`,
`relay-graphql-swc-multi-project`, `ssg-dynamic-routes-404-page`)
previously failed to deploy on npm install errors (`ERESOLVE` on the
React canary peer, the `@next/font` tarball, the local `.tar`
dependency), which #99192 fixed. The others had never run in a deploy
job.

## Verification

Ran locally with `NEXT_TEST_MODE=deploy` against this commit's local
packages, with the same env as the "Test new and changed tests when
deployed" jobs:

- Turbopack + adapter: all eight passed (54–112s each).
- Turbopack + adapter + Cache Components: the six selected by the Cache
Components manifest passed (`next-font` and `switchable-runtime` are
excluded there).
- Webpack, legacy (non-adapter) deploy, as in the release workflow: all
eight passed.
- Not run: Turbopack legacy deploy (`NEXT_ENABLE_ADAPTER=0`); my account
lacks deploy access to the Turbopack test team's project.

<!-- NEXT_JS_LLM -->
parent 2998a2e8
...@@ -18,9 +18,6 @@ const getAttrs = (elems: Cheerio) => ...@@ -18,9 +18,6 @@ const getAttrs = (elems: Cheerio) =>
.sort((a, b) => (a.href < b.href ? -1 : 1)) .sort((a, b) => (a.href < b.href ? -1 : 1))
describe('app dir - next/font', () => { describe('app dir - next/font', () => {
// TODO(deploy-test-completion): Re-enable this suite in deploy mode.
// It likely mutates files in the isolated local fixture after setup.
// @force-gate !deploy
describe('app dir - next-font', () => { describe('app dir - next-font', () => {
const { next, isNextDev: isDev } = nextTestSetup({ const { next, isNextDev: isDev } = nextTestSetup({
files: { files: {
...@@ -29,9 +26,6 @@ describe('app dir - next/font', () => { ...@@ -29,9 +26,6 @@ describe('app dir - next/font', () => {
node_modules: new FileRef(join(__dirname, 'node_modules')), node_modules: new FileRef(join(__dirname, 'node_modules')),
'next.config.js': new FileRef(join(__dirname, 'next.config.js')), 'next.config.js': new FileRef(join(__dirname, 'next.config.js')),
}, },
dependencies: {
'@next/font': 'workspace:*',
},
}) })
describe('import values', () => { describe('import values', () => {
......
...@@ -4,10 +4,6 @@ import { mkdtemp, rm } from 'fs/promises' ...@@ -4,10 +4,6 @@ import { mkdtemp, rm } from 'fs/promises'
import { tmpdir } from 'os' import { tmpdir } from 'os'
import { join } from 'path' import { join } from 'path'
// TODO(deploy-test-completion): Re-enable this suite in deploy mode.
// This test is skipped when deployed because the local tarball appears corrupted
// It also doesn't seem particularly useful to test when deployed
// @force-gate !deploy
describe('self-importing-package', () => { describe('self-importing-package', () => {
const overrideFiles: Record<string, FileRef> = {} const overrideFiles: Record<string, FileRef> = {}
let archiveDir: string let archiveDir: string
......
...@@ -3,9 +3,6 @@ import { FileRef, nextTestSetup } from 'e2e-utils' ...@@ -3,9 +3,6 @@ import { FileRef, nextTestSetup } from 'e2e-utils'
import { check } from 'next-test-utils' import { check } from 'next-test-utils'
// TODO: investigate tests failures on deploy // TODO: investigate tests failures on deploy
// TODO(deploy-test-completion): Re-enable this suite in deploy mode.
// The source only records that these assertions fail after deployment; the root cause is unknown.
// @force-gate !deploy
describe('i18n-data-fetching-redirect', () => { describe('i18n-data-fetching-redirect', () => {
const { next } = nextTestSetup({ const { next } = nextTestSetup({
files: { files: {
......
...@@ -44,8 +44,6 @@ describe('Build Error Tests', () => { ...@@ -44,8 +44,6 @@ describe('Build Error Tests', () => {
) )
}) })
// Preserve the sibling suite's deploy exclusion previously imposed by skipDeployment's it.only.
// @force-gate !deploy
describe('Static Image Component Tests', () => { describe('Static Image Component Tests', () => {
const { next, isTurbopack } = nextTestSetup({ const { next, isTurbopack } = nextTestSetup({
files: __dirname, files: __dirname,
......
...@@ -20,9 +20,6 @@ function relayCompilerValidate(next: NextInstance) { ...@@ -20,9 +20,6 @@ function relayCompilerValidate(next: NextInstance) {
} }
describe('Relay Compiler Transform - Multi Project Config', () => { describe('Relay Compiler Transform - Multi Project Config', () => {
// TODO(deploy-test-completion): Re-enable this suite in deploy mode.
// Vercel deployment fails to build/deploy this fixture in CI; skip in deploy mode.
// @force-gate !deploy
describe('project-a', () => { describe('project-a', () => {
const { next } = nextTestSetup({ const { next } = nextTestSetup({
files: __dirname, files: __dirname,
...@@ -63,9 +60,6 @@ describe('Relay Compiler Transform - Multi Project Config', () => { ...@@ -63,9 +60,6 @@ describe('Relay Compiler Transform - Multi Project Config', () => {
}) })
}) })
// TODO(deploy-test-completion): Re-enable this suite in deploy mode.
// Vercel deployment fails to build/deploy this fixture in CI; skip in deploy mode.
// @force-gate !deploy
describe('project-b', () => { describe('project-b', () => {
const { next } = nextTestSetup({ const { next } = nextTestSetup({
files: __dirname, files: __dirname,
......
import { nextTestSetup } from 'e2e-utils' import { nextTestSetup } from 'e2e-utils'
// TODO(deploy-test-completion): Re-enable this suite in deploy mode.
// Vercel deployment fails to build/deploy this fixture in CI; skip in deploy mode.
// @force-gate !deploy
describe('ssg-dynamic-routes-404-page', () => { describe('ssg-dynamic-routes-404-page', () => {
const { next } = nextTestSetup({ const { next } = nextTestSetup({
files: __dirname, files: __dirname,
......
...@@ -28,9 +28,6 @@ async function testRoute(appPort, url, { isStatic, isEdge }) { ...@@ -28,9 +28,6 @@ async function testRoute(appPort, url, { isStatic, isEdge }) {
} }
} }
// TODO(deploy-test-completion): Re-enable this suite in deploy mode.
// Prerenders used by this suite are not currently handled by deploy mode.
// @force-gate !deploy
describe('Switchable runtime', () => { describe('Switchable runtime', () => {
let context let context
......
...@@ -2,9 +2,6 @@ import { join } from 'path' ...@@ -2,9 +2,6 @@ import { join } from 'path'
import { FileRef, nextTestSetup } from 'e2e-utils' import { FileRef, nextTestSetup } from 'e2e-utils'
import { fetchViaHTTP } from 'next-test-utils' import { fetchViaHTTP } from 'next-test-utils'
// TODO(deploy-test-completion): Re-enable this suite in deploy mode.
// No deploy-specific incompatibility is documented.
// @force-gate !deploy
describe('trailingSlash:true with rewrites and getStaticProps', () => { describe('trailingSlash:true with rewrites and getStaticProps', () => {
const { next } = nextTestSetup({ const { next } = nextTestSetup({
files: new FileRef(join(__dirname, './app')), files: new FileRef(join(__dirname, './app')),
......
...@@ -2,13 +2,6 @@ import path from 'path' ...@@ -2,13 +2,6 @@ import path from 'path'
import { FileRef, nextTestSetup } from 'e2e-utils' import { FileRef, nextTestSetup } from 'e2e-utils'
describe('transpile packages', () => { describe('transpile packages', () => {
// TODO(deploy-test-completion): Re-enable this suite in deploy mode.
// No deploy-specific incompatibility is documented.
if ((global as any).isNextDeploy) {
it('should skip for deploy mode for now', () => {})
return
}
const { next } = nextTestSetup({ const { next } = nextTestSetup({
files: new FileRef(path.join(__dirname, './npm')), files: new FileRef(path.join(__dirname, './npm')),
dependencies: { dependencies: {
...@@ -16,12 +9,6 @@ describe('transpile packages', () => { ...@@ -16,12 +9,6 @@ describe('transpile packages', () => {
}, },
}) })
const { isNextDeploy } = global as any
if (isNextDeploy) {
it('should skip tests for next-deploy and react 17', () => {})
return
}
// TODO: This test is failing in Turbopack // TODO: This test is failing in Turbopack
it.skip('should handle optional peer dependencies', async () => { it.skip('should handle optional peer dependencies', async () => {
const browser = await next.browser('/peer-deps') const browser = await next.browser('/peer-deps')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment