Skip to content

Commit

Permalink
Merge pull request #1 from vercel/canary
Browse files Browse the repository at this point in the history
Merging Latest
  • Loading branch information
rishitshivesh authored Apr 11, 2024
2 parents f76fe61 + 83675ce commit 9152216
Show file tree
Hide file tree
Showing 505 changed files with 24,337 additions and 41,558 deletions.
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ contact_links:
- name: Feature request
url: https://github.com/vercel/next.js/discussions/new?category=ideas
about: Feature requests should be opened as discussions
- name: Next.js Learn course
url: https://github.com/vercel/next-learn/issues/new
about: Next.js Lean course-related issues should be reported in their respective repository
44,854 changes: 8,088 additions & 36,766 deletions .github/actions/next-integration-stat/dist/index.js

Large diffs are not rendered by default.

17 changes: 10 additions & 7 deletions .github/actions/next-integration-stat/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { context, getOctokit } from '@actions/github'
import { info, getInput } from '@actions/core'
const { default: stripAnsi } = require('strip-ansi')
const { default: nodeFetch } = require('node-fetch')
const fs = require('fs')
const path = require('path')
const semver = require('semver')
Expand Down Expand Up @@ -43,7 +42,7 @@ async function findNextJsVersionFromBuildLogs(
)

// fetch the actual logs
const jobLogsResponse = await nodeFetch(jobLogRedirectResponse.url, {
const jobLogsResponse = await fetch(jobLogRedirectResponse.url, {
headers: {
Accept: 'application/vnd.github.v3+json',
// [NOTE] we used to attach auth token, but seems this can cause 403
Expand Down Expand Up @@ -83,8 +82,7 @@ async function fetchJobLogsFromWorkflow(
job: Job
): Promise<{ logs: string; job: Job }> {
console.log(
'fetchJobLogsFromWorkflow: Checking test results for the job ',
job.name
`fetchJobLogsFromWorkflow ${job.name}: Checking test results for the job`
)

// downloadJobLogsForWorkflowRun returns a redirect to the actual logs
Expand All @@ -96,18 +94,21 @@ async function fetchJobLogsFromWorkflow(
})

console.log(
'fetchJobLogsFromWorkflow: Trying to get logs from redirect url ',
jobLogRedirectResponse.url
`fetchJobLogsFromWorkflow ${job.name}: Trying to get logs from redirect url ${jobLogRedirectResponse.url}`
)

// fetch the actual logs
const jobLogsResponse = await nodeFetch(jobLogRedirectResponse.url, {
const jobLogsResponse = await fetch(jobLogRedirectResponse.url, {
headers: {
Accept: 'application/vnd.github.v3+json',
//Authorization: `token ${token}`,
},
})

console.log(
`fetchJobLogsFromWorkflow ${job.name}: Logs response status ${jobLogsResponse.status}`
)

if (!jobLogsResponse.ok) {
throw new Error(
`Failed to get logsUrl, got status ${jobLogsResponse.status}`
Expand Down Expand Up @@ -285,6 +286,8 @@ async function getJobResults(
)
)

console.log('Logs downloaded for all jobs')

const testResultManifest: TestResultManifest = {
nextjsVersion,
buildTime,
Expand Down
46 changes: 42 additions & 4 deletions .github/actions/upload-turboyet-data/dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/actions/upload-turboyet-data/dist/index.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .github/labeler.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
{ "type": "user", "pattern": "manovotny" }
],
"created-by: turbopack team": [
{ "type": "user", "pattern": "bgw" },
{ "type": "user", "pattern": "ForsakenHarmony" },
{ "type": "user", "pattern": "kdy1" },
{ "type": "user", "pattern": "kwonoj" },
Expand Down
44 changes: 36 additions & 8 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ jobs:

test-turbopack-dev:
name: test turbopack dev
needs: ['changes', 'build-next']
needs: ['changes', 'build-next', 'build-native']
if: ${{ needs.changes.outputs.docs-only == 'false' }}

strategy:
Expand All @@ -169,7 +169,7 @@ jobs:

test-turbopack-integration:
name: test turbopack development integration
needs: ['changes', 'build-next']
needs: ['changes', 'build-next', 'build-native']
if: ${{ needs.changes.outputs.docs-only == 'false' }}

strategy:
Expand All @@ -185,7 +185,7 @@ jobs:

test-turbopack-production:
name: test turbopack production
needs: ['changes', 'build-next']
needs: ['changes', 'build-next', 'build-native']
if: ${{ needs.changes.outputs.docs-only == 'false' }}

strategy:
Expand All @@ -201,7 +201,7 @@ jobs:

test-turbopack-production-integration:
name: test turbopack production integration
needs: ['changes', 'build-next']
needs: ['changes', 'build-next', 'build-native']
if: ${{ needs.changes.outputs.docs-only == 'false' }}

strategy:
Expand Down Expand Up @@ -230,11 +230,15 @@ jobs:
test-next-swc-napi-wasi:
name: test next-swc wasi
needs: ['changes', 'build-next']
if: ${{ needs.changes.outputs.docs-only == 'false' }}
# TODO: Re-enable this when https://github.com/napi-rs/napi-rs/issues/2009 is addressed.
# Specifically, the `platform` value is now `threads` in
# https://github.com/napi-rs/napi-rs/blob/e4ad4767efaf093fdff3dc768856f6100a6e3f72/cli/src/api/build.ts#L530
if: false
# if: ${{ needs.changes.outputs.docs-only == 'false' }}

uses: ./.github/workflows/build_reusable.yml
with:
afterBuild: rustup target add wasm32-wasi-preview1-threads && turbo run build-native-wasi
afterBuild: rustup target add wasm32-wasip1-threads && turbo run build-native-wasi
stepName: 'test-next-swc-napi-wasi'
secrets: inherit

Expand All @@ -256,6 +260,30 @@ jobs:

secrets: inherit

test-new-tests-dev:
name: Test new tests for flakes (dev)
needs: ['changes', 'build-native', 'build-next']
if: ${{ needs.changes.outputs.docs-only == 'false' }}

uses: ./.github/workflows/build_reusable.yml
with:
afterBuild: node scripts/test-new-tests.mjs --dev-mode
stepName: 'test-new-tests-dev'

secrets: inherit

test-new-tests-start:
name: Test new tests for flakes (prod)
needs: ['changes', 'build-native', 'build-next']
if: ${{ needs.changes.outputs.docs-only == 'false' }}

uses: ./.github/workflows/build_reusable.yml
with:
afterBuild: node scripts/test-new-tests.mjs --prod-mode
stepName: 'test-new-tests-start'

secrets: inherit

test-dev:
name: test dev
needs: ['changes', 'build-native', 'build-next']
Expand Down Expand Up @@ -332,8 +360,6 @@ jobs:
needs: ['changes', 'build-native', 'build-next']
if: ${{ needs.changes.outputs.docs-only == 'false' }}

strategy:
fail-fast: false
uses: ./.github/workflows/build_reusable.yml
with:
nodeVersion: 18.17.0
Expand Down Expand Up @@ -433,6 +459,8 @@ jobs:
'test-next-swc-wasm',
'test-turbopack-dev',
'test-turbopack-integration',
'test-new-tests-dev',
'test-new-tests-start',
]

if: always()
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_e2e_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- run: node scripts/run-e2e-test-project-reset.mjs
name: Reset test project

- run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.35.1-jammy /bin/bash -c "cd /work && NODE_VERSION=${{ env.NODE_LTS_VERSION }} ./scripts/setup-node.sh && corepack enable > /dev/null && NEXT_JUNIT_TEST_REPORT=true DATADOG_API_KEY=${DATADOG_API_KEY} DD_ENV=ci VERCEL_TEST_TOKEN=${{ secrets.VERCEL_TEST_TOKEN }} VERCEL_TEST_TEAM=vtest314-next-e2e-tests NEXT_TEST_JOB=1 NEXT_TEST_MODE=deploy TEST_TIMINGS_TOKEN=${{ secrets.TEST_TIMINGS_TOKEN }} NEXT_TEST_CONTINUE_ON_ERROR=1 xvfb-run node run-tests.js --type e2e --timings -g ${{ matrix.group }}/2 -c 1 >> /proc/1/fd/1"
- run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.35.1-jammy /bin/bash -c "cd /work && NODE_VERSION=${{ env.NODE_LTS_VERSION }} ./scripts/setup-node.sh && corepack enable > /dev/null && NEXT_JUNIT_TEST_REPORT=true DATADOG_API_KEY=${DATADOG_API_KEY} DD_ENV=ci VERCEL_TEST_TOKEN=${{ secrets.VERCEL_TEST_TOKEN }} VERCEL_TEST_TEAM=vtest314-next-e2e-tests NEXT_TEST_JOB=1 NEXT_TEST_MODE=deploy TEST_TIMINGS_TOKEN=${{ secrets.TEST_TIMINGS_TOKEN }} xvfb-run node run-tests.js --type e2e --timings -g ${{ matrix.group }}/2 -c 1 >> /proc/1/fd/1"
name: Run test/e2e (deploy)

- name: Upload test report
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
strategy:
fail-fast: false
matrix:
group: [1, 2, 3, 4, 5, 6]
group: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]

steps:
- uses: actions/cache/restore@v3
Expand All @@ -84,7 +84,7 @@ jobs:
- name: Run test/production
run: |
NEXT_TEST_MODE=start TURBOPACK=1 TURBOPACK_BUILD=1 node run-tests.js -g ${{ matrix.group }}/6 -c ${TEST_CONCURRENCY} --type production
NEXT_TEST_MODE=start TURBOPACK=1 TURBOPACK_BUILD=1 node run-tests.js -g ${{ matrix.group }}/12 -c ${TEST_CONCURRENCY} --type production
# It is currently expected to fail some of next.js integration test, do not fail CI check.
continue-on-error: true

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/turbopack-nextjs-dev-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
strategy:
fail-fast: false
matrix:
group: [1, 2, 3, 4, 5, 6]
group: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]

steps:
- uses: actions/cache/restore@v3
Expand All @@ -84,7 +84,7 @@ jobs:
- name: Run test/development
run: |
NEXT_TEST_MODE=dev TURBOPACK=1 TURBOPACK_DEV=1 node run-tests.js -g ${{ matrix.group }}/6 -c ${TEST_CONCURRENCY} --type development
NEXT_TEST_MODE=dev TURBOPACK=1 TURBOPACK_DEV=1 node run-tests.js -g ${{ matrix.group }}/12 -c ${TEST_CONCURRENCY} --type development
# It is currently expected to fail some of next.js integration test, do not fail CI check.
continue-on-error: true

Expand Down
Loading

0 comments on commit 9152216

Please sign in to comment.