Skip to content

Commit 6d897ee

Browse files
authored
Merge branch 'canary' into patch-2
2 parents 3e5952b + c703fae commit 6d897ee

File tree

209 files changed

+3519
-2433
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

209 files changed

+3519
-2433
lines changed

.github/actions/upload-turboyet-data/dist/index.js

Lines changed: 28 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/actions/upload-turboyet-data/dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/actions/upload-turboyet-data/src/main.js

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@ const { createClient } = require('@vercel/kv')
55

66
async function main() {
77
try {
8-
const file = path.join(
9-
process.cwd(),
10-
'./test-results/nextjs-test-results.json'
11-
)
8+
const file = path.join(process.cwd(), 'test/turbopack-tests-manifest.json')
129

1310
let passingTests = ''
1411
let failingTests = ''
@@ -17,39 +14,34 @@ async function main() {
1714

1815
const contents = await fs.readFile(file, 'utf-8')
1916
const results = JSON.parse(contents)
20-
let { ref } = results
17+
2118
const currentDate = new Date()
2219
const isoString = currentDate.toISOString()
2320
const timestamp = isoString.slice(0, 19).replace('T', ' ')
2421

25-
for (const result of results.result) {
22+
for (const [testFileName, result] of Object.entries(results)) {
2623
let suitePassCount = 0
2724
let suiteFailCount = 0
2825

29-
suitePassCount += result.data.numPassedTests
30-
suiteFailCount += result.data.numFailedTests
26+
suitePassCount += result.passed.length
27+
suiteFailCount += result.failed.length
3128

32-
let suiteName = result.data.testResults[0].name
33-
// remove "/root/actions-runner/_work/next.js/next.js/" from the beginning of suiteName
34-
suiteName = suiteName.slice(
35-
'/root/actions-runner/_work/next.js/next.js/'.length
36-
)
3729
if (suitePassCount > 0) {
38-
passingTests += `${suiteName}\n`
30+
passingTests += `${testFileName}\n`
3931
}
4032

4133
if (suiteFailCount > 0) {
42-
failingTests += `${suiteName}\n`
34+
failingTests += `${testFileName}\n`
35+
}
36+
37+
for (const passed of result.passed) {
38+
const passedName = passed.replaceAll('`', '\\`')
39+
passingTests += `* ${passedName}\n`
4340
}
4441

45-
for (const assertionResult of result.data.testResults[0]
46-
.assertionResults) {
47-
let assertion = assertionResult.fullName.replaceAll('`', '\\`')
48-
if (assertionResult.status === 'passed') {
49-
passingTests += `* ${assertion}\n`
50-
} else if (assertionResult.status === 'failed') {
51-
failingTests += `* ${assertion}\n`
52-
}
42+
for (const passed of result.failed) {
43+
const failedName = passed.replaceAll('`', '\\`')
44+
failingTests += `* ${failedName}\n`
5345
}
5446

5547
passCount += suitePassCount
@@ -69,7 +61,7 @@ async function main() {
6961
token: process.env.TURBOYET_KV_REST_API_TOKEN,
7062
})
7163

72-
const testRun = `${ref}\t${timestamp}\t${passCount}/${
64+
const testRun = `${process.env.GITHUB_SHA}\t${timestamp}\t${passCount}/${
7365
passCount + failCount
7466
}`
7567

.github/workflows/turbo-daily-integration-test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
upload_test_results:
3030
name: Upload test results
3131
needs: [next_js_integration]
32-
if: github.repository_owner == 'vercel' && ${{ github.event_name == 'schedule' }} && always()
32+
# if: github.repository_owner == 'vercel' && ${{ github.event_name == 'schedule' }} && always()
33+
if: always()
3334
uses: ./.github/workflows/upload-nextjs-integration-test-results.yml
3435
secrets: inherit

.github/workflows/upload-nextjs-integration-test-results.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,26 @@ jobs:
1212
name: Upload test results
1313
runs-on: ubuntu-latest
1414
steps:
15+
- name: Setup node
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: ${{ env.NODE_LTS_VERSION }}
19+
check-latest: true
20+
1521
- name: Checkout
1622
uses: actions/checkout@v4
1723

18-
# Download test results into the `test-results` directory from the artifact created by `nextjs-integration-test`.
19-
- name: Download test results artifact
20-
uses: actions/download-artifact@v4
21-
with:
22-
name: test-results
23-
path: test-results
24+
- run: corepack enable
2425

25-
# Read next.js version from test results, set necessary environment variables.
26-
- name: Print test results
27-
run: |
28-
echo "::group::Passed test paths"
29-
cat ./test-results/passed-test-path-list.json
30-
echo "::endgroup::"
26+
- name: Install dependencies
27+
shell: bash
28+
run: pnpm i
3129

32-
echo "::group::Failed test paths"
33-
cat ./test-results/failed-test-path-list.json
34-
echo "::endgroup::"
30+
# Always run build manifest script to get the latest value
31+
- run: |
32+
node ./test/build-turbopack-tests-manifest.js
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_PULL_REQUESTS }}
3535
3636
- name: 'Upload results to "Are We Turbo Yet" KV'
3737
env:

0 commit comments

Comments
 (0)