Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(next): run latest next.js canary test on the CI #2808

Merged
merged 4 commits into from
Nov 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
83 changes: 83 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,89 @@ jobs:
with:
commit_message: Benchmark result for ${{ steps.date.outputs.pretty }} (${{ github.sha }})

next_js_integration:
ForsakenHarmony marked this conversation as resolved.
Show resolved Hide resolved
needs: [determine_jobs, rust_prepare, rust_build_release]
if: needs.determine_jobs.outputs.rust == 'true'
name: Next.js integration test
runs-on: ubuntu-latest-8-core-oss
strategy:
fail-fast: false
matrix:
node: [16, 18]
kwonoj marked this conversation as resolved.
Show resolved Hide resolved
group: [1, 2]
env:
# Enabling backtract will makes snapshot tests fail
RUST_BACKTRACE: 0
NEXT_TELEMETRY_DISABLED: 1
NEXT_TEST_JOB: 1
__INTERNAL_CUSTOM_TURBOPACK_BINARY: ${{ github.workspace }}/artifacts/release-x86_64-unknown-linux-musl/next-dev

steps:
# https://github.com/actions/virtual-environments/issues/1187
- name: tune linux network
run: sudo ethtool -K eth0 tx off rx off

- name: Checkout
uses: actions/checkout@v3
with:
repository: vercel/next.js
ref: v13.0.5-canary.5

- name: Setup pnpm
uses: pnpm/action-setup@v2.2.4
with:
version: 7.3.0

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
cache: pnpm
ForsakenHarmony marked this conversation as resolved.
Show resolved Hide resolved

- name: Download binary
uses: actions/download-artifact@v3
with:
path: artifacts
kwonoj marked this conversation as resolved.
Show resolved Hide resolved

- name: Validate next-dev binary
run: |
chmod +x ${{ github.workspace }}/artifacts/release-x86_64-unknown-linux-musl/next-dev
${{ github.workspace }}/artifacts/release-x86_64-unknown-linux-musl/next-dev --display-version

- name: Install dependencies
run: |
corepack disable
pnpm install
pnpm run build

- run: npm i -g playwright-chromium@1.22.2 && npx playwright install-deps
timeout-minutes: 15

- run: npx @replayio/playwright install chromium

- run: |
chmod +x ${{ github.workspace }}/artifacts/release-x86_64-unknown-linux-musl/next-dev
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this line in every step?
Also, can you move the script to the bottom below name and env? 🙃

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This (chmod +x) is coming from digging unexpected test hanging issue, left it for the precaution as this is minor and easy to take out once things are stablized.

I just realized the order for name / env - this is what current next.js CI steps are written and I didn't recognize somehow. 🤔

node run-tests.js --type development --timings -g ${{ matrix.group }}/2
name: Run test/development
env:
RECORD_REPLAY_METADATA_TEST_RUN_TITLE: testDev / Group ${{ matrix.group }}

- run: |
chmod +x ${{ github.workspace }}/artifacts/release-x86_64-unknown-linux-musl/next-dev
node run-tests.js --type e2e --timings -g ${{ matrix.group }}/3
name: Run test/e2e (dev)
env:
RECORD_REPLAY_METADATA_TEST_RUN_TITLE: testDevE2E / Group ${{ matrix.group }} / Node ${{ matrix.node }}
NEXT_TEST_MODE: dev
RECORD_REPLAY_TEST_METRICS: 1

- run: |
chmod +x ${{ github.workspace }}/artifacts/release-x86_64-unknown-linux-musl/next-dev
xvfb-run node run-tests.js --timings -g ${{ matrix.group }}/20
name: Test Integration
env:
RECORD_REPLAY_METADATA_TEST_RUN_TITLE: testIntegration / Group ${{ matrix.group }}
Comment on lines +851 to +872
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably want to put each of these into different jobs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, one day we'll need better scheduling.


node_lint:
name: Node.js linting
runs-on: ubuntu-latest
Expand Down