Skip to content

Commit

Permalink
Merge branch 'main' into tomknickman/turbo-568-allow-specific-commit-…
Browse files Browse the repository at this point in the history
  • Loading branch information
tknickman committed Nov 28, 2022
2 parents 5b9fce7 + bcf3461 commit 375921d
Show file tree
Hide file tree
Showing 23 changed files with 2,484 additions and 451 deletions.
95 changes: 95 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,8 @@ jobs:

- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
target: wasm32-unknown-unknown

- name: Setup Go
uses: ./.github/actions/setup-go
Expand All @@ -287,6 +289,16 @@ jobs:
command: check
args: --workspace --all-targets

- name: Run cargo feature check for next-binding
run: |
# Known set of feature combinations we need to support
# next-swc/core
cargo check -p next-binding --features __swc_core_next_core,__swc_core_binding_napi_plugin,__swc_core_testing_transform,__swc_testing,__swc_transform_styled_components,__swc_transform_styled_jsx,__swc_transform_emotion,__swc_transform_modularize_imports
# next-swc/napi
cargo check -p next-binding --features __swc_core_binding_napi,__swc_core_binding_napi_plugin,__feature_next_dev_server,__feature_node_file_trace,__feature_mdx_rs
# next-swc/wasm
cargo check -p next-binding --features __swc_core_binding_wasm,__swc_core_binding_wasm_plugin,__feature_mdx_rs --target wasm32-unknown-unknown
rust_lint:
needs: [determine_jobs, rust_prepare]
if: needs.determine_jobs.outputs.rust == 'true'
Expand Down Expand Up @@ -788,6 +800,89 @@ jobs:
with:
commit_message: Benchmark result for ${{ steps.date.outputs.pretty }} (${{ github.sha }})

next_js_integration:
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]
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

- name: Download binary
uses: actions/download-artifact@v3
with:
path: artifacts

- 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
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 }}
node_lint:
name: Node.js linting
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .taplo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ keys = ["dependencies", "*-dependencies"]

[rule.formatting]
reorder_keys = true
align_entries = true
indent_tables = true

0 comments on commit 375921d

Please sign in to comment.