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

add turbopack integration tests to CI #50904

Merged
merged 50 commits into from
Jun 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
71d066a
add turbopack integration tests to CI
sokra Jun 7, 2023
e0333b4
add to tests-pass
sokra Jun 7, 2023
ac3d583
add to turbo.json
sokra Jun 7, 2023
52b71eb
disable LTO for test cases
sokra Jun 7, 2023
3a80663
fixes
sokra Jun 7, 2023
482a783
speed up bench tests
sokra Jun 7, 2023
05c8b18
add disk and ram info
sokra Jun 8, 2023
eb57331
move disk and ram info
sokra Jun 8, 2023
aa4267b
less concurrency
sokra Jun 8, 2023
a738b2c
disable tracing for tests
sokra Jun 8, 2023
84fc4ca
install chromium
sokra Jun 8, 2023
5422c74
remove chrome install
sokra Jun 8, 2023
820b3c8
remove feature
sokra Jun 8, 2023
873d6f4
fix browser launching
ijjk Jun 8, 2023
f7d067e
disable LTO for test cases
sokra Jun 7, 2023
a2f28c6
add disk and ram info
sokra Jun 8, 2023
075dc12
move disk and ram info
sokra Jun 8, 2023
e165f77
update chromiumoxide
sokra Jun 9, 2023
fc80440
update swc_core and chromiumoxide
sokra Jun 9, 2023
5ac4ad8
link
sokra Jun 9, 2023
a543ec4
fmt
sokra Jun 9, 2023
b0713a9
link
sokra Jun 9, 2023
d71a351
update snapshots, preserve order for next-font-transform
sokra Jun 9, 2023
a8e60c8
use unique tmp dir
sokra Jun 9, 2023
3c54a17
update lockfile
sokra Jun 9, 2023
6b5f413
link
sokra Jun 9, 2023
e692b0f
run CI more concurrently
sokra Jun 9, 2023
8dc6752
enable no-capture
sokra Jun 9, 2023
2b1e8da
update test case snapshot
sokra Jun 9, 2023
a07ea2f
fixup
sokra Jun 9, 2023
9b2f4fd
fixup
sokra Jun 9, 2023
7fc7615
add rust need
sokra Jun 9, 2023
7d0a094
add logging
sokra Jun 9, 2023
842a6f2
use ipv4
sokra Jun 9, 2023
9aa1c77
use head
sokra Jun 9, 2023
aa85d0f
more logging
sokra Jun 9, 2023
88cb629
Merge branch 'canary' into sokra/ci-turbopack-integration
ijjk Jun 10, 2023
09ee52a
Remove no-capture
sokra Jun 11, 2023
a8933c5
Revert "use ipv4"
sokra Jun 11, 2023
65382b4
fix test case
sokra Jun 11, 2023
b16a061
fix test case
sokra Jun 11, 2023
10839e1
fix test case
sokra Jun 12, 2023
ccf6b7b
update turbopack
sokra Jun 12, 2023
4cfb045
revert with_head
sokra Jun 12, 2023
4884f39
fmt
sokra Jun 12, 2023
906ab0d
Merge remote-tracking branch 'origin/canary' into sokra/ci-turbopack-…
sokra Jun 12, 2023
8e56366
prettier
sokra Jun 12, 2023
ffb5e2d
Merge branch 'canary' into sokra/ci-turbopack-integration
ijjk Jun 12, 2023
6b46915
Merge branch 'canary' into sokra/ci-turbopack-integration
kodiakhq[bot] Jun 12, 2023
b43300c
Merge branch 'canary' into sokra/ci-turbopack-integration
kodiakhq[bot] Jun 12, 2023
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
2 changes: 1 addition & 1 deletion .config/nextest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ filter = "package(next-dev-tests)"
leak-timeout = "500ms"
retries = 2
slow-timeout = "60s"
threads-required = 2
threads-required = 4
failure-output = "immediate-final"
66 changes: 52 additions & 14 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,23 @@ env:
NEXT_TEST_JOB: 1

jobs:
build:
name: build
build-native:
name: build-native
uses: ./.github/workflows/build_reusable.yml
with:
skipInstallBuild: 'yes'
secrets: inherit

build-next:
name: build-next
uses: ./.github/workflows/build_reusable.yml
with:
skipNativeBuild: 'yes'
secrets: inherit

lint:
name: lint
needs: ['build']
needs: ['build-native', 'build-next']

uses: ./.github/workflows/build_reusable.yml
with:
Expand All @@ -44,7 +53,7 @@ jobs:

check-types-precompiled:
name: types and precompiled
needs: ['build']
needs: ['build-native', 'build-next']

uses: ./.github/workflows/build_reusable.yml
with:
Expand All @@ -54,29 +63,56 @@ jobs:

test-cargo-unit:
name: test cargo unit
needs: ['build']
needs: ['build-next']

uses: ./.github/workflows/build_reusable.yml
with:
skipForDocsOnly: 'yes'
needsRust: 'yes'
skipInstallBuild: 'yes'
skipNativeBuild: 'yes'
afterBuild: turbo run test-cargo-unit
secrets: inherit

test-cargo-integration:
name: test cargo integration
needs: ['build-next']

uses: ./.github/workflows/build_reusable.yml
with:
skipForDocsOnly: 'yes'
needsNextest: 'yes'
needsRust: 'yes'
skipNativeBuild: 'yes'
afterBuild: xvfb-run turbo run test-cargo-integration

test-cargo-bench:
name: test cargo benchmarks
needs: ['build-next']

uses: ./.github/workflows/build_reusable.yml
with:
skipForDocsOnly: 'yes'
needsRust: 'yes'
skipNativeBuild: 'yes'
afterBuild: xvfb-run turbo run test-cargo-bench

rust-check:
name: rust check
needs: ['build']
needs: ['build-next']

uses: ./.github/workflows/build_reusable.yml
with:
skipForDocsOnly: 'yes'
needsRust: 'yes'
skipInstallBuild: 'yes'
skipNativeBuild: 'yes'
afterBuild: turbo run rust-check
secrets: inherit

test-turbopack-dev:
name: test turbopack dev
needs: ['build']
needs: ['build-native', 'build-next']
uses: ./.github/workflows/build_reusable.yml
with:
skipForDocsOnly: 'yes'
Expand All @@ -85,8 +121,7 @@ jobs:

test-next-swc-wasm:
name: test next-swc wasm
needs: ['build']

needs: ['build-native', 'build-next']
uses: ./.github/workflows/build_reusable.yml
with:
skipForDocsOnly: 'yes'
Expand All @@ -95,7 +130,7 @@ jobs:

test-dev:
name: test dev
needs: ['build']
needs: ['build-native', 'build-next']
strategy:
fail-fast: false
matrix:
Expand All @@ -109,7 +144,7 @@ jobs:

test-prod:
name: test prod
needs: ['build']
needs: ['build-native', 'build-next']
strategy:
fail-fast: false
matrix:
Expand All @@ -123,7 +158,7 @@ jobs:

test-integration:
name: test integration
needs: ['build']
needs: ['build-native', 'build-next']
strategy:
fail-fast: false
matrix:
Expand All @@ -138,7 +173,7 @@ jobs:

test-firefox-safari:
name: test firefox and safari
needs: ['build']
needs: ['build-native', 'build-next']

uses: ./.github/workflows/build_reusable.yml
with:
Expand All @@ -149,13 +184,16 @@ jobs:
tests-pass:
needs:
[
'build',
'build-native',
'build-next',
'lint',
'check-types-precompiled',
'test-dev',
'test-prod',
'test-integration',
'test-cargo-unit',
'test-cargo-integration',
'test-cargo-bench',
'rust-check',
'test-next-swc-wasm',
'test-turbopack-dev',
Expand Down
16 changes: 15 additions & 1 deletion .github/workflows/build_reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
required: false
description: 'whether to skip pnpm install && pnpm build'
type: string
skipNativeBuild:
required: false
description: 'whether to skip building native modules'
type: string
skipForDocsOnly:
required: false
description: 'skip for docs only changes'
Expand All @@ -19,6 +23,10 @@ on:
required: false
description: 'version of Node.js to use'
type: string
needsRust:
required: false
description: 'if rust is needed'
type: string
needsNextest:
required: false
description: 'if nextest rust dep is needed'
Expand Down Expand Up @@ -67,6 +75,7 @@ jobs:
# local action -> needs to run after checkout
- name: Install Rust
uses: ./.github/actions/setup-rust
if: ${{ inputs.skipNativeBuild != 'yes' || inputs.needsNextest == 'yes' || inputs.needsRust == 'yes' }}
with:
components: rustfmt, clippy

Expand All @@ -75,11 +84,15 @@ jobs:
uses: taiki-e/install-action@nextest

- run: rustc --version
if: ${{ inputs.skipNativeBuild != 'yes' || inputs.needsNextest == 'yes' || inputs.needsRust == 'yes' }}

- run: npm i -g yarn "pnpm@${PNPM_VERSION}" "turbo@${TURBO_VERSION}" "@napi-rs/cli@${NAPI_CLI_VERSION}"

# clean up any previous artifacts to avoid hitting disk space limits
- run: git clean -xdf && rm -rf /tmp/next-repo-*; rm -rf /tmp/next-install-* /tmp/yarn-* /tmp/ncc-cache target && cargo clean
- run: git clean -xdf && rm -rf /tmp/next-repo-*; rm -rf /tmp/next-install-* /tmp/yarn-* /tmp/ncc-cache target

- run: cargo clean
if: ${{ inputs.skipNativeBuild != 'yes' || inputs.needsNextest == 'yes' || inputs.needsRust == 'yes' }}

- run: echo "DOCS_CHANGE<<EOF" >> $GITHUB_OUTPUT; echo "$(node scripts/run-for-change.js --not --type docs --exec echo 'nope')" >> $GITHUB_OUTPUT; echo 'EOF' >> $GITHUB_OUTPUT
name: check docs only change
Expand All @@ -90,6 +103,7 @@ jobs:
name: normalize versions

- run: turbo run build-native-release --summarize -- --target x86_64-unknown-linux-gnu
if: ${{ inputs.skipNativeBuild != 'yes' }}

- name: Upload next-swc artifact
if: ${{ inputs.uploadSwcArtifact == 'yes' }}
Expand Down