Commit graph

334 commits

Author SHA1 Message Date
Tobias Koppers
d4d779145c
refactor shared logic for turbopack-cli (#48307)
### What?

* move some shared runtime logic to turbopack
* use relative imports from internal code when possible
* move react-refresh logic to turbopack
* move benchmark code logic to turobpack

see https://github.com/vercel/turbo/pull/4553

### Why?

We want to have benchmarking again for turbopack PRs
We want to have a standalone turbopack cli (eventually)
We want to avoid duplicating the runtime code

### How?

refactoring, moving code
2023-04-13 14:54:34 +02:00
Tobias Koppers
bd8d7c61f7
Speed up native dev build (#48028)
### What?

More power for the CI to build the native binary for testing

### Why?

Waiting 1 hour for the tests is just too slow

### How?

More Cores
2023-04-06 18:50:27 +02:00
Tobias Koppers
9b0af04649
update turbopack (#48006)
see #47994
2023-04-06 09:50:04 +00:00
Tobias Koppers
e643d52eb3
Run bench tests as part of CI (#47849)
### What?

enables the benchmark tests from turbopack again

### Why?

It tests common scenarios like HMR

fixes WEB-792

---------

Co-authored-by: Alex Kirszenberg <alex.kirszenberg@vercel.com>
2023-04-05 14:54:08 +00:00
JJ Kasper
29ed52b01c
Add merge_group actions trigger 2023-04-04 20:52:39 -07:00
JJ Kasper
c05514079b
Ensure GH actions tests run for trunk branches (#47883)
We need to run for all branches for trunk to test correctly
2023-04-03 16:45:55 -07:00
JJ Kasper
320ebe2d34
Update flakey tests and add Node.js setup retrying (#47871)
x-ref:
https://github.com/vercel/next.js/actions/runs/4599615812/jobs/8125278036
x-ref:
https://github.com/vercel/next.js/actions/runs/4598323624/jobs/8124618075?pr=47365
x-ref:
https://github.com/vercel/next.js/actions/runs/4598323624/jobs/8124612692?pr=47365
2023-04-03 13:37:14 -07:00
JJ Kasper
57d51b0e22
Tweak Vercel CLI installing for E2E tests (#47804)
Avoids accidentally running the CLI install twice at the same time due
to concurrency by pre-installing it before starting tests.

x-ref:
https://github.com/vercel/next.js/actions/runs/4581102424/jobs/8090565967
x-ref:
https://github.com/vercel/next.js/blob/canary/test/lib/next-modes/next-deploy.ts#L27
2023-04-01 15:36:21 -07:00
JJ Kasper
a5269cf096
Fix docs only check for test-native-integration (#47800)
x-ref:
https://github.com/vercel/next.js/actions/runs/4585187133/jobs/8097219720
x-ref:
https://github.com/vercel/next.js/actions/runs/4585188922/jobs/8097221396
2023-04-01 14:27:38 -07:00
OJ Kwon
d66236f2d8
test(turbopack): blocking CI for turbopack integration test (#47709)
<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation or adding/fixing Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md



## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->

- closes WEB-766.

This PR enables a new job for running tests, against turbopack. Since we
have observed some flakiness across turbopack test execution, it starts
from absolute minimum set of tests to not block any CI due to unexpected
failure.

Ran manual workflow roughly ~50 times and looks like these set of tests
are fine to make it as blocking check for the PR. In the future, depends
on the stability we'll increase number of test gradually.
2023-03-31 18:50:35 -07:00
Steven
d83f68ccf7
chore(ci): fix codemod tests (#47710)
These tests were failing with the following error:

```
Failed to fetch origin/canary Error: Command failed: git fetch origin canary
fatal: could not read Username for 'https://github.com/': No such device or address
```

https://github.com/vercel/next.js/actions/runs/4220015224/jobs/7325960064#step:5:13

- Follow up to https://github.com/vercel/next.js/pull/46068
2023-03-31 04:27:16 +00:00
Tobias Koppers
ebe0686a9d
Run turbopack integration tests for next.js changes too (#47608)
### What?

Turbopack tests need to run on any change

### Why?

Next.js changes might break turbopack and we want to avoid that.

### How?

Change CI job

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-30 18:21:19 +02:00
JJ Kasper
ed156fa18f
Update pnpm version for trigger release 2023-03-29 22:01:40 -07:00
JJ Kasper
28d56ec95f
Update test create-next-app running (#47611)
This re-enables running the CNA tests for all non-docs changes as it's now ensuring we don't regress on turbopack or our default templates. 

Also fixes the main repo's package.json files from being modified during tests.
2023-03-28 17:39:00 +00:00
OJ Kwon
553cf48acb
ci(workflow): run checks for the test specific features (#47572)
This PR is minor update to ci workflow to verify test-only features are
being compilable correctly.
2023-03-27 14:31:45 -07:00
JJ Kasper
cbb6dda6a3
Tweak trigger release cloning 2023-03-23 23:07:52 -07:00
JJ Kasper
af89adbd61
Update fetch cache memory handling (#47465)
This ensures we only honor cache entries from the in memory cache for up
to 2 seconds so that revalidates can correctly propagate and also
increases max fetch cache entry size to 2 MB. The `fetchCache` export is
also being detected in this PR but not yet honored which will be done in
a follow-up.
2023-03-23 22:30:08 -07:00
JJ Kasper
2a257cef60
Fix trigger_release workflow type (#47466)
Follow-up to https://github.com/vercel/next.js/pull/47461 swapping the
workflow type
2023-03-23 16:37:53 -07:00
JJ Kasper
d0bdd8f230
Add workflow to trigger release (#47461)
As discussed this adds a publish workflow that can be triggered for
canary or stable releases which ensures we are publishing from a
consistent environment and local config doesn't affect a release.
2023-03-23 16:28:49 -07:00
JJ Kasper
84a416b5e1
Fix build spinner in TTY env (#47383)
This ensures the build spinner is correctly stopped in a TTY environment
and also adds regression tests for `app` and `pages` to ensure this
behaves as expected.

This updates our docker image to use the `jammy` tag instead of `focal`
to match the Ubuntu version to our CI.
2023-03-22 12:56:39 -07:00
JJ Kasper
fed3ffa865
Skip extra swc builds (#47378)
This removes some extra swc builds which are rarely if ever used and are
also prone to breaking fairly often due to the extra configuration
required to build them.

x-ref: [slack
thread](https://vercel.slack.com/archives/C04KC8A53T7/p1679434160981059)
2023-03-21 16:09:52 -07:00
Balázs Orbán
316638bc03
chore: add checkout step to issue labeler action (#47346) 2023-03-21 13:27:09 +00:00
LongYinan
509ed00fc1
Calling turbopack from the next build CLI (#46602)
Close WEB-661
2023-03-21 10:25:08 +00:00
Balázs Orbán
1a47872b64
chore: fix issue labeler (#47206)
### What?

A fork of https://github.com/github/issue-labeler that we pull in and
maintain.

### Why?

The official issue labeler had some issues which I tried to fix in PRs
and eventually got merged upstream, but the release cycle was a bit
slow, and that GitHub action had many parts we did not really need
anyway. So it makes sense to maintain it ourselves.

### How?

This PR removes the
https://github.com/vercel/next.js/blob/canary/.github/issue-labeler.yml
config file, which in our case is just a sublist of
https://github.com/vercel/next.js/labels anyway. Instead, we can pull in
the labels from GitHub directly and filter out those that we want to
apply to issues. This will keep things more in sync.

fix NEXT-750 ([link](https://linear.app/vercel/issue/NEXT-750))

---------
2023-03-20 17:55:56 -07:00
Tobias Koppers
6eb33b7e68
update turbopack (#47205)
## Features

* https://github.com/vercel/turbo/pull/4208

## Testing

* https://github.com/vercel/turbo/pull/4211


Co-authored-by: Justin Ridgewell <112982+jridgewell@users.noreply.github.com>
2023-03-17 08:41:32 +00:00
JJ Kasper
c7534092c7
Fix failing CI checks (#47223)
x-ref:
https://github.com/vercel/next.js/actions/runs/4441543036/jobs/7796929887
x-ref:
https://github.com/vercel/next.js/actions/runs/4441543036/jobs/7796930146
2023-03-16 18:59:52 -07:00
Steven
0e91549397
chore(ci): automatically deploy selected examples (#47130)
fix NEXT-822 ([link](https://linear.app/vercel/issue/NEXT-822))
([NEXT-822](https://linear.app/vercel/issue/NEXT-822))

---------
2023-03-15 17:01:26 -07:00
Tobias Koppers
c27b546908
re-enable next-dev-tests (#47087)
### What?

enables the next-dev-tests crate integration tests from trubopack

### Why?

to unblock the move PR we temporarily disabled the tests

### How?

Fix the new location and fix the expect dependency

Fixes WEB-708

---------

Co-authored-by: Justin Ridgewell <justin@ridgewell.name>
2023-03-14 16:05:19 +01:00
Justin Ridgewell
8ae2df0f10 Integrate next-* crates from Turbopack (#47019)
Update workspace cargo deps
Update cargo deps to point to local workspace
Ignore too-many-arguments warnings
Fix clippy errors
Update pnpm workspaces
exclude integration tests from unit tests CI
rust-analyzer settings
add rust flags and env vars
2023-03-13 14:33:17 +01:00
JJ Kasper
9be98e4aec
Use turbo remote cache for build-native-test (#46975)
This ensures we leverage the turbo remote cache when able to for the dev
swc binary as well.

x-ref:
https://github.com/vercel/next.js/actions/runs/4378909387/jobs/7664237608
2023-03-09 14:06:05 -08:00
Justin Ridgewell
8e14b672cc
Update Turbopack to 230309.2 (#46971)
# New Features
- https://github.com/vercel/turbo/pull/3975

# Bug Fixes
- https://github.com/vercel/turbo/pull/4129
- https://github.com/vercel/turbo/pull/4134
- https://github.com/vercel/turbo/pull/4062

# Performance
- https://github.com/vercel/turbo/pull/4093
2023-03-09 13:24:24 -08:00
JJ Kasper
4ac4b757d4
Update fetch cache internal handling (#46522)
x-ref:
https://github.com/vercel/next.js/actions/runs/4288511720/jobs/7470646795
x-ref:
https://github.com/vercel/next.js/actions/runs/4288511720/jobs/7470647108
x-ref:
https://github.com/vercel/next.js/actions/runs/4288511720/jobs/7470647255
2023-02-27 21:39:11 -08:00
Jan Kaifer
f3ef4e99b0
Cover 1st-party examples with tests (#45270)Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
We want to make sure that our examples are not breaking.
We don't want to be slowed down by broken 3rd party packages, but we
need to ensure that examples covering next.js features are always green.

Added as a standalone workflow that doesn't parallelize. It will just
run on a cron schedule, so we can check for current status. We can add
Slack ping later if we need to.

The workflow tests just that our examples can build, so mostly TS
issues. We could definitely follow up with actual tests, but that is not
as low-hanging.

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2023-02-27 11:54:24 +01:00
Rich Haines
16e2fd6dc3
Update Edge Runtime docs page (#46239)
<!--
Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:
-->

This PR updates the Edge Runtime docs on the next.js docs site with
simplified tables for each API section

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ]
[e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-02-22 20:40:21 -08:00
JJ Kasper
833917c06e
Remove cache built files step (#46264
x-ref:
https://github.com/vercel/next.js/actions/runs/4245921677/jobs/7382113875
2023-02-22 12:21:46 -08:00
JJ Kasper
34e08e8d70
Skip build step for docs only change (#46225
Since we don't need to run type-checking for docs only changes we can
skip the build step and speed up docs PRs a bit

x-ref:
https://github.com/vercel/next.js/actions/runs/4238129393/jobs/7364888664
2023-02-21 19:01:05 -08:00
Steven
1ccb9afe55
chore(ci): remove needs: build-native-test from codemod test (#46192)
Follow up to https://github.com/vercel/next.js/pull/46068

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-21 17:06:13 -08:00
JJ Kasper
c765fadfbe
Update CI test setup (#46138
This updates our CI testing flow to only run against LTS Node.js version
on PRs and then run against the maintenance Node.js version when cutting
a release. This will allow speeding up PR test runs to get feedback
faster and remove un-necessary duplicate testing as it's very rare a
change breaks the maintenance Node.js version but not the LTS version.
2023-02-20 16:33:36 -08:00
Steven
2513965f1a
chore(ci): add job to test codemods (#46068)
This PR ensures the tests for codemods will automatically run in CI when the source code changes.

Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2023-02-20 04:42:02 +00:00
JJ Kasper
930d27e64c
Fix failed cache restoring (#46083)
x-ref:
https://github.com/vercel/next.js/actions/runs/4209022913/jobs/7306627952
2023-02-17 21:19:11 -08:00
JJ Kasper
e2649af6b1
Remove built files chown 2023-02-17 17:46:43 -08:00
JJ Kasper
ce1e5de258
Disable cache built files step 2023-02-17 17:08:05 -08:00
JJ Kasper
061a6472e9
Fix cache built files step (#46075)
x-ref:
https://github.com/vercel/next.js/actions/runs/4207348694/jobs/7303897663
x-ref:
https://github.com/vercel/next.js/actions/runs/4207892633/jobs/7304098168
x-ref:
https://github.com/vercel/next.js/actions/runs/4208156556/jobs/7303845860
2023-02-17 16:38:12 -08:00
Jan Kaifer
9d94c43fa4
Change github issues labeler to upstream repo - our changes were merged (#45986)
- reverted to github version because that works now

<!--
Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:
-->

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ]
[e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2023-02-16 16:21:28 +00:00
Jan Kaifer
216e8b6ba3
Remove action adding "linear" label which is not used anymore (#45911)
We don't need this action anymore, so we are deleting it.
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2023-02-14 22:22:28 +00:00
LongYinan
ac7f2b6fe7
Make turbotrace run after the webpack build (#45621)
- [x] Depends on https://github.com/vercel/next.js/pull/45776

Turbotrace occupies too many memories while running; this PR makes it
run after the webpack build is finished, it can reduce the memory
hogging by webpack and turbotrace, thus avoiding OOM

The `maxFiles` option in turbotrace is removed because there is
`memoryLimit` option takes over its role.

Close WEB-556
2023-02-10 20:58:55 +01:00
Balázs Orbán
8456a51a66
chore: update issue-labeler (#45706) 2023-02-08 14:41:48 +00:00
JJ Kasper
1596e12b77
Increase GitHub actions job timeouts (#45638
Sometimes just slow and 5 minutes shouldn't necessarily mean it's
stalled.

x-ref:
https://github.com/vercel/next.js/actions/runs/4108689367/jobs/7089706579
x-ref:
https://github.com/vercel/next.js/actions/runs/4108034590/jobs/7088293296
x-ref:
https://github.com/vercel/next.js/actions/runs/4104654636/jobs/7080497165
2023-02-06 16:35:18 -08:00
Jan Kaifer
d022ccb432
Clean up CI logs (#45171) 2023-02-02 15:46:17 +00:00
Balázs Orbán
61a6065d04
chore(github): update issue labeler (#45444) 2023-01-31 17:32:16 +00:00