Compare commits
35 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b001a4529b | |||
| 8c7edfb431 | |||
| 758c5a6f13 | |||
| be3e3dc3d9 | |||
| 0b143a7306 | |||
| 3aaedd3d57 | |||
| f0779ee7bd | |||
| b6abd81bc5 | |||
| 3781cfeaec | |||
| d5b829e62f | |||
| b848dd47f5 | |||
| 3e88dcecca | |||
| 63465ad044 | |||
| 2b371eabc4 | |||
| 7c6cbbf339 | |||
| 2953a17906 | |||
| 9bcb39364f | |||
| ae7de55920 | |||
| afab5299d0 | |||
| 2f1d887032 | |||
| c4eff655c4 | |||
| 2abc3c6d7a | |||
| 8b64caaaa5 | |||
| 91aa699b00 | |||
| c5ba63f976 | |||
| 89523f9e8a | |||
| 14130ad0ea | |||
| a5b1ec330b | |||
| 4ded9bdd00 | |||
| d1a32b034f | |||
| d387b064d3 | |||
| e6476528b1 | |||
| d6dedaba42 | |||
| 0347c1daed | |||
| 6fcb011935 |
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"mcpServers": {
|
||||
"nx-mcp": {
|
||||
"url": "http://localhost:9470/sse"
|
||||
"url": "http://localhost:9470/mcp"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ nx affected --targets=lint,test,build,e2e-ci
|
||||
|
||||
In CI, Nx Agents will allow all tasks to run in parallel on the same machine, except for the atomized end-to-end tasks, which will only run in isolation.
|
||||
|
||||
Learn more about how you can [Parallelize Tasks Across Multiple Machines Using Nx Agents](/ci/intro/tutorials/github-actions#parallelize-tasks-across-multiple-machines-using-nx-agents):
|
||||
Learn more about how you can [Parallelize Tasks Across Multiple Machines Using Nx Agents](/ci/features/split-e2e-tasks):
|
||||
|
||||
{% youtube
|
||||
src="https://youtu.be/0YxcxIR7QU0"
|
||||
|
||||
@@ -94,7 +94,7 @@ The routes exist as projects which are then imported by the application. We can
|
||||
|
||||
Adopting a monorepo powered by Nx on its own does not solve build speeds or CI pipeline times. But adopting a monorepo and taking the time to reevaluate your architecture can lead to a significant improvement in build times when best practices are applied. If you're curious to know more, reach out to us to see how Nx can improve your monorepo experience and ship faster!
|
||||
|
||||
{% call-to-action title="Explore Nx Cloud for Enterprises" url="/enterprise" icon="nxcloud" description="Learn more about our offerings for enterprises and contact our team" %} Explore Nx Cloud for Enterprises {% /call-to-action %}
|
||||
{% call-to-action title="Reach out to our team!" url="/contact/sales" icon="nxcloud" description="Looking to transform your teams velocity? Reach out to learn more about Nx Enterprise and see how we can help your team achieve similar results." /%}
|
||||
|
||||
## Further reading
|
||||
|
||||
|
||||
@@ -86,4 +86,4 @@ Consolidating projects into a single repository **eliminated the complexity of m
|
||||
|
||||
Hetzner Cloud continues to **work closely with the Nx Developer Productivity Engineering (DPE) team** to monitor and refine their setup. By actively collaborating, they ensure that their monorepo remains optimized and that their CI is continuously improved. This ongoing partnership allows Hetzner Cloud to adapt to new challenges, fine-tune configurations, and further push the boundaries of efficiency in their development workflow.
|
||||
|
||||
{% call-to-action title="Want to achieve similar results?" url="/enterprise" icon="nxcloud" description="Learn more about Nx Enterprise or get started with a free trial." /%}
|
||||
{% call-to-action title="Reach out to our team!" url="/contact/sales" icon="nxcloud" description="Looking to transform your teams velocity? Reach out to learn more about Nx Enterprise and see how we can help your team achieve similar results." /%}
|
||||
|
||||
@@ -73,6 +73,4 @@ Other engineers in other business units are seeing the advantage of Nx, and thei
|
||||
|
||||
What's blocking you from getting your products to market fast? Let our team figure it out for you! With Nx Enterprise, you receive expert guidance from day one, ensuring your setup is optimized for maximum efficiency. Whether you're starting fresh, migrating, or scaling your developer platform, we'll work with you to tailor the perfect solution for your team.
|
||||
|
||||
{% call-to-action title="Get a Free Trial of Nx Enterprise" url="/enterprise" icon="nxcloud" description="Learn more about our enterprise offerings or request a free trial of Nx Enterprise" %}
|
||||
|
||||
{% /call-to-action %}
|
||||
{% call-to-action title="Reach out to our team!" url="/contact/sales" icon="nxcloud" description="Looking to transform your teams velocity? Reach out to learn more about Nx Enterprise and see how we can help your team achieve similar results." /%}
|
||||
|
||||
@@ -109,7 +109,7 @@ When run on a single machine, `e2e-ci` will be slower because it starts multiple
|
||||
npx nx connect
|
||||
```
|
||||
|
||||
Follow the onboarding steps and you should be connected within five minutes. For more information, check out our [GitHub Actions Tutorial](/ci/intro/tutorials/github-actions) or our [guides](/ci/recipes/set-up) for all supported CI providers (GitHub, GitLab, Azure, etc.).
|
||||
Follow the onboarding steps and you should be connected within five minutes. For more information, check out our [setup guides](/ci/recipes/set-up) for all supported CI providers (GitHub, GitLab, Azure, etc.).
|
||||
|
||||
Now, let's take a look at a concrete example to get an idea of how much time-saving you can unlock with Nx Atomizer. I created [this repo](https://github.com/jaysoo/angular-testing-demo) that contains a simple Angular application and a UI package. It also has 40 Playwright test files.
|
||||
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
---
|
||||
title: 'The More the Merrier - Groups Save 50% on Nx Essentials Workshop'
|
||||
slug: nx-essentials-workshop
|
||||
authors: []
|
||||
tags: ['workshop']
|
||||
cover_image: /blog/images/2025-07-23/header.avif
|
||||
description: 'Join us for a 2-day deep dive into all things Nx! Instructors from Nx and Push-Based will team up to cover the breadth of tools and techniques needed for any tech lead or individual contributor to be successful setting up and navigating an Nx workspace.'
|
||||
---
|
||||
|
||||
You may have missed the Early Bird discount, but it’s not too late to get an amazing price on our [Nx Essentials online workshop](https://bit.ly/3IYOILt). **Groups of 3 or more can use the promo code NXGROUP at checkout to save 50% on everyone’s registration.**
|
||||
|
||||
## About the Workshop
|
||||
|
||||
**Dates:** July 29th-30th
|
||||
|
||||
**Time:** 12pm - 5pm ET/9am-2pm PT
|
||||
|
||||
This is a 2-day deep dive into all things Nx! Instructors from Nx and Push-Based will team up to cover the breadth of tools and techniques needed for any tech lead or individual contributor to be successful optimizing your development workflow with Nx.
|
||||
|
||||
We believe that the most effective way to learn is often to get in there and start trying things out yourself, so topics will be presented via short presentations followed by hands-on code labs. Our instructors will work with attendees, offering help to anyone who gets stuck and engaging discussion topics for anyone blazing ahead.
|
||||
|
||||
While the course starts with the very basics of Nx, it quickly moves into advanced topics, so attendees of any experience level should come away with new insights.
|
||||
|
||||
We’ll cover…
|
||||
|
||||
- **Using Nx –** Run Tasks, Task Pipelines, Affected, Caching, Generate Code
|
||||
- **Enforcing Organizational Decisions –** Configure Module Boundaries, Create a Custom Plugin to Manage Docker Configs
|
||||
- **Boosting Performance –** Module Federation, Remote Caching, Nx Agents, Optimize Cache Settings, Atomizer, Flaky Tasks
|
||||
|
||||
And more! **Every exercise will also include clear action steps for you to try out in your own repository.**
|
||||
|
||||
## Need help justifying the expense?
|
||||
|
||||
We’ve drafted a [sample justification letter](https://bit.ly/44pNuzX) you can use.
|
||||
|
||||
And if you think your team might be a good fit for Nx Enterprise, your workshop fees can also be applied as a discount towards new contracts signed within 6 months of the workshop date.
|
||||
|
||||
[Check out the full details and save your spot for the Nx Essentials workshop!](https://bit.ly/3IYOILt)
|
||||
@@ -0,0 +1,105 @@
|
||||
---
|
||||
title: 'From 5 Days to 20 Minutes: How PayFit Accelerated Time to Market with Strategic Nx Implementation'
|
||||
slug: payfit-success-story
|
||||
authors: [Juri Strumpflohner]
|
||||
tags: ['customer story']
|
||||
description: Discover how a 4-person platform team at Payfit turned monorepo abandonment into a competitive advantage using strategic Nx implementation.
|
||||
cover_image: /blog/images/articles/bg-payfit-customer-success.avif
|
||||
youtubeUrl: https://youtu.be/Vdk-tza4PCs
|
||||
metrics:
|
||||
- value: '5 days→20 min'
|
||||
label: 'feature deployment time'
|
||||
- value: '75% faster'
|
||||
label: 'coding time'
|
||||
- value: '4 engineers'
|
||||
label: 'platform team managing entire frontend ecosystem'
|
||||
- value: '100%'
|
||||
label: 'teams wanting to migrate back to monorepo'
|
||||
---
|
||||
|
||||
PayFit is a leading European HR and payroll platform serving thousands of businesses across the continent with their innovative SaaS solutions. As one of Europe's fastest-growing HR tech companies, PayFit continues to expand rapidly across multiple markets. Their engineering organization faced a classic scale challenge: maintaining development velocity while managing an increasingly complex codebase distributed across multiple repositories.
|
||||
|
||||
With a lean but highly strategic platform team of just four engineers responsible for frontend tooling, design systems, monorepo health, and CI/CD infrastructure, PayFit needed maximum efficiency to compete in the demanding startup landscape. When deployment cycles stretched from 2-5 days per feature and teams abandoned their shared monorepo due to poor initial implementation, the company was at a critical inflection point that threatened their competitive advantage in the fast-moving European HR tech market.
|
||||
|
||||
## Challenge
|
||||
|
||||
Payfit's journey with Nx began with a top-down mandate that didn't include the necessary knowledge transfer or support systems. This led to a predictable outcome: teams abandoned the monorepo entirely. At a critical tipping point, engineering teams extracted themselves from the shared workspace, prioritizing autonomy over the collaborative benefits that a well-managed monorepo could provide.
|
||||
|
||||
The consequences of this fragmentation were severe:
|
||||
|
||||
- **Deployment complexity** – Deploying a single feature required navigating multiple repositories and systems sequentially, taking between **2 and 5 days** to complete.
|
||||
- **Lost development velocity** – Teams accepted slower development pace as the cost of independence.
|
||||
- **Fragmented ownership** – No clear ownership or maintenance of shared tooling and infrastructure.
|
||||
- **CI/CD inefficiencies** – Each repository required its own CI setup and optimization, leading to duplicated effort and inconsistent performance.
|
||||
|
||||
In a startup environment where speed to market is crucial, these delays were becoming a significant competitive disadvantage.
|
||||
|
||||
## Solution
|
||||
|
||||
Nicolas Beaussart joined Payfit as a staff engineer with a clear mission: revive the monorepo and restore development velocity. Rather than forcing teams back immediately, the platform team took a strategic approach focused on proving value through execution.
|
||||
|
||||
The team focused on making the monorepo a compelling choice rather than a mandate:
|
||||
|
||||
- **Invested in monorepo health** – Properly configured Nx with task inference to ensure everything worked smoothly out of the box.
|
||||
- **Leveraged Nx Cloud** – Implemented Nx Cloud to dramatically speed up CI performance and eliminate the manual optimization burden.
|
||||
- **Pilot program approach** – Started with a few pilot teams to migrate back and demonstrate the benefits in practice.
|
||||
- **Created social proof** – Early positive feedback from pilot teams served as validation for other teams considering the migration.
|
||||
|
||||
### Offloading Complexity with Nx Cloud
|
||||
|
||||
One of the most significant improvements came from adopting [Nx Cloud](https://nx.app) to handle CI optimization. This shift from manual CI optimization to automated intelligence freed the platform team to focus on higher-value work while ensuring optimal performance.
|
||||
|
||||
{% testimonial
|
||||
name="Nicolas Beaussart"
|
||||
title="Staff Engineer, Payfit"
|
||||
image="https://avatars.githubusercontent.com/u/7281023?v=4" %}
|
||||
The number of hours we spent optimizing CI before, trying to load balance in CircleCI, the different number of agents that we run ourselves by hand... it was painful and we spent hours and days trying to do that. The main thing with Nx Cloud is that we don't have to think about that.
|
||||
{% /testimonial %}
|
||||
|
||||
The strategic approach paid off. Positive feedback from pilot teams created a snowball effect:
|
||||
|
||||
> "Slowly but surely it went into a snowball effect where now teams want to migrate themselves back into the monorepo directly themselves."
|
||||
|
||||
This organic adoption was far more sustainable than the original top-down mandate, as teams could see the concrete benefits in their daily work.
|
||||
|
||||
## Results
|
||||
|
||||
### Dramatic Reduction in Deployment Time
|
||||
|
||||
The most striking improvement was in feature deployment speed:
|
||||
|
||||
- **From 2-5 days to 20 minutes maximum** – The initial optimization achieved in the October 2024 interview reduced deployment time to 2 hours (a 97% reduction). Since then, the PayFit team has continued optimizing their deployment pipeline, achieving just _20 minutes from branch push to full production deployment across all environments—including merge, dev, staging, e2e, and production_.
|
||||
- **75% faster coding** – Features that previously took much longer to code can now be developed in a quarter of the time
|
||||
|
||||
{% testimonial
|
||||
name="Nicolas Beaussart"
|
||||
title="Staff Engineer, Payfit"
|
||||
image="/documentation/blog/images/articles/nicolas-beaussart.avif" %}
|
||||
A year ago to deploy a feature it took between 2 and 5 days because you had to go through all of the monorepos, all of the systems one by one to be able to deploy that. Today the same feature can be coded in like a quarter of the time and deploying like 2 hours tops (now even down to only 20 min).
|
||||
{% /testimonial %}
|
||||
|
||||
### Restored Team Confidence in Monorepo Architecture
|
||||
|
||||
The platform team successfully reversed the initial exodus from the monorepo:
|
||||
|
||||
- Teams now **actively request to migrate back** to the main monorepo
|
||||
- **100% positive feedback** from teams that have migrated back
|
||||
- Strong **social proof** driving organic adoption across the organization
|
||||
|
||||
### Operational Efficiency Through Automation
|
||||
|
||||
By leveraging Nx Cloud's intelligent CI optimization, the platform team eliminated a major operational burden:
|
||||
|
||||
- **Zero time spent** on manual CI optimization and load balancing
|
||||
- **Predictable performance** without manual intervention
|
||||
- **Direct support channel** with Nx team for any optimization needs
|
||||
|
||||
### Competitive Advantage in Startup Environment
|
||||
|
||||
For a startup where speed to market is crucial, these improvements translated directly to business impact:
|
||||
|
||||
> "This is critical in a startup world where things need to move fast, and a big part of this answer is Nx and Nx Cloud. Without those pieces, I don't think we could have the same velocity that we have right now."
|
||||
|
||||
The transformation enabled Payfit to maintain their competitive edge while scaling their engineering organization efficiently.
|
||||
|
||||
{% call-to-action title="Reach out to our team!" url="/contact/sales" icon="nxcloud" description="Looking to transform your teams velocity? Reach out to learn more about Nx Enterprise and see how we can help your team achieve similar results." /%}
|
||||
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 333 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 972 KiB |
|
After Width: | Height: | Size: 27 KiB |
@@ -0,0 +1,19 @@
|
||||
# Nx 21.3
|
||||
|
||||
## Features
|
||||
|
||||
{% cards cols="2" %}
|
||||
{% card title="Angular 20.1 Support" type="document" url="/technologies/angular/introduction" /%}
|
||||
{% card title="Jest 30 Support" type="document" url="/technologies/test-tools/jest/introduction" /%}
|
||||
{% card title="Enhanced TUI with Live Task Durations" type="external" url="https://github.com/nrwl/nx/pull/31897" /%}
|
||||
{% card title="CI Workflow Enhancements" type="external" url="https://github.com/nrwl/nx/pull/31833" /%}
|
||||
{% /cards %}
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
{% cards cols="2" %}
|
||||
{% card title="Improved TUI Terminal Output for Skipped Tasks" type="external" url="https://github.com/nrwl/nx/pull/31559" /%}
|
||||
{% card title="Better Error Handling in Daemon Server" type="external" url="https://github.com/nrwl/nx/pull/31728" /%}
|
||||
{% card title="Fix Angular NgRx Facade Spec Generation" type="external" url="https://github.com/nrwl/nx/pull/31850" /%}
|
||||
{% card title="Improved Parent Gitignore Handling for Nested Workspaces" type="external" url="https://github.com/nrwl/nx/pull/31911" /%}
|
||||
{% /cards %}
|
||||
@@ -17,4 +17,4 @@ We’ll also take a quick detour to discuss `namedInputs` in `nx.json`, ensuring
|
||||
## Relevant Links
|
||||
|
||||
- [Run Only Tasks Affected by a PR](/ci/features/affected)
|
||||
- [Tutorial: Github Actions with Nx](/ci/intro/tutorials/github-actions#create-a-ci-workflow)
|
||||
- [Guide: Github Actions with Nx](/ci/recipes/set-up/monorepo-ci-github-actions)
|
||||
|
||||
@@ -38,40 +38,6 @@
|
||||
"isExternal": false,
|
||||
"path": "/ci/intro/connect-to-nx-cloud",
|
||||
"tags": []
|
||||
},
|
||||
{
|
||||
"id": "tutorials",
|
||||
"name": "Tutorials",
|
||||
"description": "Tutorials setting up CI with Nx",
|
||||
"mediaImage": "",
|
||||
"file": "",
|
||||
"itemList": [
|
||||
{
|
||||
"id": "circle",
|
||||
"name": "Circle CI with Nx",
|
||||
"description": "",
|
||||
"mediaImage": "",
|
||||
"file": "nx-cloud/tutorial/circle",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/ci/intro/tutorials/circle",
|
||||
"tags": []
|
||||
},
|
||||
{
|
||||
"id": "github-actions",
|
||||
"name": "GitHub Actions with Nx",
|
||||
"description": "",
|
||||
"mediaImage": "",
|
||||
"file": "nx-cloud/tutorial/github-actions",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/ci/intro/tutorials/github-actions",
|
||||
"tags": []
|
||||
}
|
||||
],
|
||||
"isExternal": false,
|
||||
"path": "/ci/intro/tutorials",
|
||||
"tags": []
|
||||
}
|
||||
],
|
||||
"isExternal": false,
|
||||
@@ -111,62 +77,6 @@
|
||||
"path": "/ci/intro/connect-to-nx-cloud",
|
||||
"tags": []
|
||||
},
|
||||
"/ci/intro/tutorials": {
|
||||
"id": "tutorials",
|
||||
"name": "Tutorials",
|
||||
"description": "Tutorials setting up CI with Nx",
|
||||
"mediaImage": "",
|
||||
"file": "",
|
||||
"itemList": [
|
||||
{
|
||||
"id": "circle",
|
||||
"name": "Circle CI with Nx",
|
||||
"description": "",
|
||||
"mediaImage": "",
|
||||
"file": "nx-cloud/tutorial/circle",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/ci/intro/tutorials/circle",
|
||||
"tags": []
|
||||
},
|
||||
{
|
||||
"id": "github-actions",
|
||||
"name": "GitHub Actions with Nx",
|
||||
"description": "",
|
||||
"mediaImage": "",
|
||||
"file": "nx-cloud/tutorial/github-actions",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/ci/intro/tutorials/github-actions",
|
||||
"tags": []
|
||||
}
|
||||
],
|
||||
"isExternal": false,
|
||||
"path": "/ci/intro/tutorials",
|
||||
"tags": []
|
||||
},
|
||||
"/ci/intro/tutorials/circle": {
|
||||
"id": "circle",
|
||||
"name": "Circle CI with Nx",
|
||||
"description": "",
|
||||
"mediaImage": "",
|
||||
"file": "nx-cloud/tutorial/circle",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/ci/intro/tutorials/circle",
|
||||
"tags": []
|
||||
},
|
||||
"/ci/intro/tutorials/github-actions": {
|
||||
"id": "github-actions",
|
||||
"name": "GitHub Actions with Nx",
|
||||
"description": "",
|
||||
"mediaImage": "",
|
||||
"file": "nx-cloud/tutorial/github-actions",
|
||||
"itemList": [],
|
||||
"isExternal": false,
|
||||
"path": "/ci/intro/tutorials/github-actions",
|
||||
"tags": []
|
||||
},
|
||||
"/ci/features": {
|
||||
"id": "features",
|
||||
"name": "Features",
|
||||
|
||||
@@ -6802,31 +6802,6 @@
|
||||
"isExternal": false,
|
||||
"children": [],
|
||||
"disableCollapsible": false
|
||||
},
|
||||
{
|
||||
"name": "Tutorials",
|
||||
"path": "/ci/intro/tutorials",
|
||||
"id": "tutorials",
|
||||
"isExternal": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "Circle CI with Nx",
|
||||
"path": "/ci/intro/tutorials/circle",
|
||||
"id": "circle",
|
||||
"isExternal": false,
|
||||
"children": [],
|
||||
"disableCollapsible": false
|
||||
},
|
||||
{
|
||||
"name": "GitHub Actions with Nx",
|
||||
"path": "/ci/intro/tutorials/github-actions",
|
||||
"id": "github-actions",
|
||||
"isExternal": false,
|
||||
"children": [],
|
||||
"disableCollapsible": false
|
||||
}
|
||||
],
|
||||
"disableCollapsible": false
|
||||
}
|
||||
],
|
||||
"disableCollapsible": false
|
||||
|
||||
@@ -399,6 +399,16 @@
|
||||
}
|
||||
},
|
||||
"migrations": {
|
||||
"/technologies/angular/api/migrations/21.3.5-jest-package-updates": {
|
||||
"description": "",
|
||||
"file": "generated/packages/angular/migrations/21.3.5-jest-package-updates.json",
|
||||
"hidden": false,
|
||||
"name": "21.3.5-jest-package-updates",
|
||||
"version": "21.3.5-beta.0",
|
||||
"originalFilePath": "/packages/angular",
|
||||
"path": "/technologies/angular/api/migrations/21.3.5-jest-package-updates",
|
||||
"type": "migration"
|
||||
},
|
||||
"/technologies/angular/api/migrations/update-angular-cli-version-20-1-0": {
|
||||
"description": "Update the @angular/cli package version to ~20.1.0.",
|
||||
"file": "generated/packages/angular/migrations/update-angular-cli-version-20-1-0.json",
|
||||
@@ -2218,6 +2228,26 @@
|
||||
}
|
||||
},
|
||||
"migrations": {
|
||||
"/technologies/test-tools/jest/api/migrations/21.3.3-jest-util-package-updates": {
|
||||
"description": "",
|
||||
"file": "generated/packages/jest/migrations/21.3.3-jest-util-package-updates.json",
|
||||
"hidden": false,
|
||||
"name": "21.3.3-jest-util-package-updates",
|
||||
"version": "21.3.3-beta.3",
|
||||
"originalFilePath": "/packages/jest",
|
||||
"path": "/technologies/test-tools/jest/api/migrations/21.3.3-jest-util-package-updates",
|
||||
"type": "migration"
|
||||
},
|
||||
"/technologies/test-tools/jest/api/migrations/21.3.3-package-updates": {
|
||||
"description": "",
|
||||
"file": "generated/packages/jest/migrations/21.3.3-package-updates.json",
|
||||
"hidden": false,
|
||||
"name": "21.3.3-package-updates",
|
||||
"version": "21.3.3-beta.0",
|
||||
"originalFilePath": "/packages/jest",
|
||||
"path": "/technologies/test-tools/jest/api/migrations/21.3.3-package-updates",
|
||||
"type": "migration"
|
||||
},
|
||||
"/technologies/test-tools/jest/api/migrations/rename-test-path-pattern": {
|
||||
"description": "Rename the CLI option `testPathPattern` to `testPathPatterns`.",
|
||||
"file": "generated/packages/jest/migrations/rename-test-path-pattern.json",
|
||||
|
||||
@@ -439,6 +439,16 @@
|
||||
}
|
||||
],
|
||||
"migrations": [
|
||||
{
|
||||
"description": "",
|
||||
"file": "generated/packages/angular/migrations/21.3.5-jest-package-updates.json",
|
||||
"hidden": false,
|
||||
"name": "21.3.5-jest-package-updates",
|
||||
"version": "21.3.5-beta.0",
|
||||
"originalFilePath": "/packages/angular",
|
||||
"path": "angular/migrations/21.3.5-jest-package-updates",
|
||||
"type": "migration"
|
||||
},
|
||||
{
|
||||
"description": "Update the @angular/cli package version to ~20.1.0.",
|
||||
"file": "generated/packages/angular/migrations/update-angular-cli-version-20-1-0.json",
|
||||
@@ -2402,6 +2412,26 @@
|
||||
}
|
||||
],
|
||||
"migrations": [
|
||||
{
|
||||
"description": "",
|
||||
"file": "generated/packages/jest/migrations/21.3.3-jest-util-package-updates.json",
|
||||
"hidden": false,
|
||||
"name": "21.3.3-jest-util-package-updates",
|
||||
"version": "21.3.3-beta.3",
|
||||
"originalFilePath": "/packages/jest",
|
||||
"path": "jest/migrations/21.3.3-jest-util-package-updates",
|
||||
"type": "migration"
|
||||
},
|
||||
{
|
||||
"description": "",
|
||||
"file": "generated/packages/jest/migrations/21.3.3-package-updates.json",
|
||||
"hidden": false,
|
||||
"name": "21.3.3-package-updates",
|
||||
"version": "21.3.3-beta.0",
|
||||
"originalFilePath": "/packages/jest",
|
||||
"path": "jest/migrations/21.3.3-package-updates",
|
||||
"type": "migration"
|
||||
},
|
||||
{
|
||||
"description": "Rename the CLI option `testPathPattern` to `testPathPatterns`.",
|
||||
"file": "generated/packages/jest/migrations/rename-test-path-pattern.json",
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "21.3.5-jest-package-updates",
|
||||
"version": "21.3.5-beta.0",
|
||||
"requires": {
|
||||
"@angular/compiler-cli": ">=18.0.0 <21.0.0",
|
||||
"@angular/core": ">=18.0.0 <21.0.0",
|
||||
"@angular/platform-browser-dynamic": ">=18.0.0 <21.0.0",
|
||||
"jest": "^30.0.0"
|
||||
},
|
||||
"packages": {
|
||||
"jest-preset-angular": {
|
||||
"version": "~15.0.0",
|
||||
"alwaysAddToPackageJson": false
|
||||
}
|
||||
},
|
||||
"aliases": [],
|
||||
"description": "",
|
||||
"hidden": false,
|
||||
"implementation": "",
|
||||
"path": "/packages/angular",
|
||||
"schema": null,
|
||||
"type": "migration"
|
||||
}
|
||||
@@ -152,7 +152,8 @@ The `@nx/gradle` is configured in the `plugins` array in `nx.json`.
|
||||
"testTargetName": "test",
|
||||
"classesTargetName": "classes",
|
||||
"buildTargetName": "build",
|
||||
"ciTestTargetName": "test-ci"
|
||||
"ciTestTargetName": "test-ci",
|
||||
"ciIntTestTargetName": "intTest-ci"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -161,23 +162,101 @@ The `@nx/gradle` is configured in the `plugins` array in `nx.json`.
|
||||
|
||||
Once a Gradle configuration file has been identified, the targets are created with the name you specify under `testTargetName`, `classesTargetName` or `buildTargetName` in the `nx.json` `plugins` array. The default names for the inferred targets are `test`, `classes` and `build`.
|
||||
|
||||
### Splitting Tests
|
||||
### Test Distribution
|
||||
|
||||
The `@nx/gradle` plugin will automatically split your testing tasks by test class if you provide a `ciTestTargetName`. You can read more about the Atomizer feature [here](/ci/features/split-e2e-tasks). Nx will create a task with the name that you specify which can be used in CI to run the tests for each test class in a distributed fashion.
|
||||
Nx provides powerful features for distributing tasks in CI, including test splitting (also known as atomization) and optimized build targets. For Gradle projects, this is facilitated by the `@nx/gradle` plugin, allowing you to run your tests and builds more efficiently in your Continuous Integration (CI) environment.
|
||||
|
||||
```json {% fileName="nx.json" highlightLines=[6] %}
|
||||
#### How to Set Up Test Distribution (Atomizer) in CI
|
||||
|
||||
To enable test distribution for your Gradle projects in CI, follow these steps:
|
||||
|
||||
1. **Generate CI Workflow**: Run the `ci-workflow` generator to set up the necessary CI configurations. This generator creates a GitHub Actions workflow file that integrates with Nx's distributed task execution capabilities.
|
||||
|
||||
```shell
|
||||
nx g @nx/gradle:ci-workflow
|
||||
```
|
||||
|
||||
This command will generate a workflow file (e.g., `.github/workflows/ci.yml`) tailored for your Nx workspace with Gradle projects.
|
||||
|
||||
2. **Configure `nx.json` for Atomizer**: Add or ensure the presence of `ciTestTargetName` or `ciIntTestTargetName` in the `@nx/gradle` plugin options within your `nx.json`.
|
||||
|
||||
```json {% fileName="nx.json" highlightLines=[6,7] %}
|
||||
{
|
||||
"plugins": [
|
||||
{
|
||||
"plugin": "@nx/gradle",
|
||||
"options": {
|
||||
"ciTestTargetName": "test-ci",
|
||||
"ciIntTestTargetName": "intTest-ci"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Setting these options turns on the atomizer feature in CI. Nx will automatically split your testing tasks (unit and integration tests, respectively) by test class, allowing them to be run in a distributed fashion across your CI agents.
|
||||
|
||||
3. **Update CI Workflow Command**: In your generated CI workflow file, modify the command used to run affected tasks. Instead of using a generic `build` target, leverage the `build-ci` target provided by the `@nx/gradle` plugin:
|
||||
|
||||
```shell
|
||||
# Before:
|
||||
# ./nx affected --base=$NX_BASE --head=$NX_HEAD -t build
|
||||
|
||||
# After:
|
||||
./nx affected --base=$NX_BASE --head=$NX_HEAD -t build-ci
|
||||
```
|
||||
|
||||
This ensures that your CI pipeline utilizes the optimized `build-ci` target, which is designed to integrate seamlessly with Nx's test distribution and caching mechanisms.
|
||||
|
||||
#### The `ci-workflow` Generator
|
||||
|
||||
The `@nx/gradle:ci-workflow` generator is a utility that automates the setup of a CI workflow for your Nx workspace containing Gradle projects. It creates a `.github/workflows` file (or equivalent for other CI providers) that includes steps for checking out code, setting up Java and Gradle, restoring caches, and running affected Nx tasks. Its primary purpose is to streamline the integration of Nx's CI features, such as distributed task execution and caching, into your existing CI pipeline.
|
||||
|
||||
#### The `build-ci` Target
|
||||
|
||||
The `@nx/gradle` plugin can create a `build-ci` target that is specifically designed for use in CI environments. This target allows for a more optimized and consistent build process by ensuring that the `check` task is rewired to its CI counterpart (`check-ci`), which also implies that test tasks (`test` and `intTest`) are rewired to their atomized `test-ci` and `intTest-ci` counterparts respectively.
|
||||
|
||||
##### What is it?
|
||||
|
||||
The `build-ci` target is a synthetic Nx target that acts as a placeholder for your Gradle `build` task in a CI context. Instead of directly running the `build` task, the `build-ci` target ensures that the `check` task (a dependency of `build`) first executes its CI-optimized version (`check-ci`), which in turn uses the split/atomized test tasks (`test-ci`, `intTest-ci`). This allows for distributed execution of tests and efficient caching in CI.
|
||||
|
||||
##### How to Enable?
|
||||
|
||||
To enable the `build-ci` target, you need to configure `ciTestTargetName` or `ciIntTestTargetName` in the `@nx/gradle` plugin options in your `nx.json`.
|
||||
|
||||
For example:
|
||||
|
||||
```json {% fileName="nx.json" %}
|
||||
{
|
||||
"plugins": [
|
||||
{
|
||||
"plugin": "@nx/gradle",
|
||||
"options": {
|
||||
"ciTestTargetName": "test-ci"
|
||||
"ciTestTargetName": "test-ci",
|
||||
"ciBuildTargetName": "build-ci"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
When `ciTestTargetName` (or `ciIntTestTargetName`) is set, the `build-ci` target is automatically created if the `build` task exists for a given Gradle project.
|
||||
|
||||
##### Expected Behavior
|
||||
|
||||
When you run `nx build-ci <your-gradle-project>`, Nx will:
|
||||
|
||||
1. Execute the `check-ci` task (if defined) instead of the standard `check` task.
|
||||
2. The `check-ci` task will, in turn, trigger the atomized test tasks (`test-ci` and `intTest-ci`) if they are configured.
|
||||
3. The `build-ci` target itself will use the `nx:noop` executor, meaning it doesn't execute a direct Gradle command, but rather relies on its dependencies (`check-ci`) to orchestrate the build process in a CI-friendly manner.
|
||||
4. The `build-ci` target is cacheable.
|
||||
|
||||
This setup ensures that your build process in CI leverages Nx's caching and distribution capabilities effectively.
|
||||
|
||||
##### How to Turn it Off?
|
||||
|
||||
To disable the `build-ci` target, simply remove the `ciBuildTargetName` option from the `@nx/gradle` plugin configuration in your `nx.json` file. If `ciTestTargetName` and `ciIntTestTargetName` are also removed, then the special CI targets for tests and check will also be turned off.
|
||||
|
||||
### Continuous Tasks
|
||||
|
||||
Gradle doesn't have a standard way to identify tasks which are [continuous](/reference/project-configuration#continuous), like `bootRun` for serving a Spring Boot project. To ensure Nx handles these continuous tasks correctly, you can explicitly mark them as continuous.
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "21.3.3-jest-util-package-updates",
|
||||
"version": "21.3.3-beta.3",
|
||||
"requires": { "jest": ">=30.0.0 <31.0.0", "ts-jest": ">=29.4.0" },
|
||||
"packages": {
|
||||
"jest-util": { "version": "~30.0.0", "addToPackageJson": "devDependencies" }
|
||||
},
|
||||
"aliases": [],
|
||||
"description": "",
|
||||
"hidden": false,
|
||||
"implementation": "",
|
||||
"path": "/packages/jest",
|
||||
"schema": null,
|
||||
"type": "migration"
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "21.3.3-package-updates",
|
||||
"version": "21.3.3-beta.0",
|
||||
"packages": {
|
||||
"ts-jest": { "version": "~29.4.0", "alwaysAddToPackageJson": false }
|
||||
},
|
||||
"aliases": [],
|
||||
"description": "",
|
||||
"hidden": false,
|
||||
"implementation": "",
|
||||
"path": "/packages/jest",
|
||||
"schema": null,
|
||||
"type": "migration"
|
||||
}
|
||||
@@ -245,7 +245,7 @@
|
||||
"type": "string",
|
||||
"description": "The file to include.",
|
||||
"x-completion-type": "file",
|
||||
"x-completion-glob": "**/*@(.css|.scss|.less|.sass|.styl|.stylus)"
|
||||
"x-completion-glob": "**/*@(.css|.scss|.less|.sass)"
|
||||
},
|
||||
"bundleName": {
|
||||
"type": "string",
|
||||
@@ -264,7 +264,7 @@
|
||||
"type": "string",
|
||||
"description": "The file to include.",
|
||||
"x-completion-type": "file",
|
||||
"x-completion-glob": "**/*@(.css|.scss|.less|.sass|.styl|.stylus)"
|
||||
"x-completion-glob": "**/*@(.css|.scss|.less|.sass)"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -316,7 +316,7 @@
|
||||
"type": "string",
|
||||
"description": "The file to include.",
|
||||
"x-completion-type": "file",
|
||||
"x-completion-glob": "**/*@(.css|.scss|.less|.sass|.styl|.stylus)"
|
||||
"x-completion-glob": "**/*@(.css|.scss|.less|.sass)"
|
||||
},
|
||||
"bundleName": {
|
||||
"type": "string",
|
||||
@@ -335,7 +335,7 @@
|
||||
"type": "string",
|
||||
"description": "The file to include.",
|
||||
"x-completion-type": "file",
|
||||
"x-completion-glob": "**/*@(.css|.scss|.less|.sass|.styl|.stylus)"
|
||||
"x-completion-glob": "**/*@(.css|.scss|.less|.sass)"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -409,7 +409,7 @@
|
||||
"type": "string",
|
||||
"description": "The file to include.",
|
||||
"x-completion-type": "file",
|
||||
"x-completion-glob": "**/*@(.css|.scss|.less|.sass|.styl|.stylus)"
|
||||
"x-completion-glob": "**/*@(.css|.scss|.less|.sass)"
|
||||
},
|
||||
"bundleName": {
|
||||
"type": "string",
|
||||
@@ -428,7 +428,7 @@
|
||||
"type": "string",
|
||||
"description": "The file to include.",
|
||||
"x-completion-type": "file",
|
||||
"x-completion-glob": "**/*@(.css|.scss|.less|.sass|.styl|.stylus)"
|
||||
"x-completion-glob": "**/*@(.css|.scss|.less|.sass)"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -49,10 +49,6 @@
|
||||
"value": "scss",
|
||||
"label": "SASS(.scss) [ http://sass-lang.com ]"
|
||||
},
|
||||
{
|
||||
"value": "styl",
|
||||
"label": "Stylus(.styl) [ http://stylus-lang.com ]"
|
||||
},
|
||||
{
|
||||
"value": "less",
|
||||
"label": "LESS [ http://lesscss.org ]"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
"style": {
|
||||
"type": "string",
|
||||
"description": "The style solution to use.",
|
||||
"enum": ["none", "css", "scss", "less", "styl"]
|
||||
"enum": ["none", "css", "scss", "less"]
|
||||
},
|
||||
"rootProject": { "type": "boolean", "x-priority": "internal" },
|
||||
"keepExistingVersions": {
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
},
|
||||
"less": { "type": "boolean", "description": "Use less for styling." },
|
||||
"sass": { "type": "boolean", "description": "Use sass for styling." },
|
||||
"stylus": { "type": "boolean", "description": "Use stylus for styling." },
|
||||
"unitTestRunner": {
|
||||
"type": "string",
|
||||
"description": "The unit test runner to use.",
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
"type": "string",
|
||||
"description": "The file to include.",
|
||||
"x-completion-type": "file",
|
||||
"x-completion-glob": "**/*@(.css|.scss|.less|.sass|.styl|.stylus)"
|
||||
"x-completion-glob": "**/*@(.css|.scss|.less|.sass)"
|
||||
},
|
||||
"bundleName": {
|
||||
"type": "string",
|
||||
@@ -160,7 +160,7 @@
|
||||
"type": "string",
|
||||
"description": "The file to include.",
|
||||
"x-completion-type": "file",
|
||||
"x-completion-glob": "**/*@(.css|.scss|.less|.sass|.styl|.stylus)"
|
||||
"x-completion-glob": "**/*@(.css|.scss|.less|.sass)"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -177,7 +177,7 @@
|
||||
"type": "string",
|
||||
"description": "The file to include.",
|
||||
"x-completion-type": "file",
|
||||
"x-completion-glob": "**/*@(.css|.scss|.less|.sass|.styl|.stylus)"
|
||||
"x-completion-glob": "**/*@(.css|.scss|.less|.sass)"
|
||||
},
|
||||
"bundleName": {
|
||||
"type": "string",
|
||||
@@ -196,7 +196,7 @@
|
||||
"type": "string",
|
||||
"description": "The file to include.",
|
||||
"x-completion-type": "file",
|
||||
"x-completion-glob": "**/*@(.css|.scss|.less|.sass|.styl|.stylus)"
|
||||
"x-completion-glob": "**/*@(.css|.scss|.less|.sass)"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -442,7 +442,7 @@
|
||||
"type": "string",
|
||||
"description": "The file to include.",
|
||||
"x-completion-type": "file",
|
||||
"x-completion-glob": "**/*@(.css|.scss|.less|.sass|.styl|.stylus)"
|
||||
"x-completion-glob": "**/*@(.css|.scss|.less|.sass)"
|
||||
},
|
||||
"bundleName": {
|
||||
"type": "string",
|
||||
@@ -461,7 +461,7 @@
|
||||
"type": "string",
|
||||
"description": "The file to include.",
|
||||
"x-completion-type": "file",
|
||||
"x-completion-glob": "**/*@(.css|.scss|.less|.sass|.styl|.stylus)"
|
||||
"x-completion-glob": "**/*@(.css|.scss|.less|.sass)"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -2525,23 +2525,6 @@
|
||||
"name": "Connect to Nx Cloud",
|
||||
"id": "connect-to-nx-cloud",
|
||||
"file": "nx-cloud/intro/connect-to-cloud"
|
||||
},
|
||||
{
|
||||
"name": "Tutorials",
|
||||
"id": "tutorials",
|
||||
"description": "Tutorials setting up CI with Nx",
|
||||
"itemList": [
|
||||
{
|
||||
"name": "Circle CI with Nx",
|
||||
"id": "circle",
|
||||
"file": "nx-cloud/tutorial/circle"
|
||||
},
|
||||
{
|
||||
"name": "GitHub Actions with Nx",
|
||||
"id": "github-actions",
|
||||
"file": "nx-cloud/tutorial/github-actions"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -30,9 +30,9 @@ npx nx connect
|
||||
|
||||
{% link-card title="E2E Test Auto-Splitting and Distribution" type="video" url="https://youtu.be/0YxcxIR7QU0" icon="nxagents" /%}
|
||||
|
||||
{% link-card title="Circle CI with Nx" type="tutorial" url="/ci/intro/tutorials/circle" icon="circleci" /%}
|
||||
{% link-card title="Circle CI with Nx" type="tutorial" url="/ci/recipes/set-up/monorepo-ci-circle-ci" icon="circleci" /%}
|
||||
|
||||
{% link-card title="GitHub Actions with Nx" type="tutorial" url="/ci/intro/tutorials/github-actions" icon="github" /%}
|
||||
{% link-card title="GitHub Actions with Nx" type="tutorial" url="/ci/recipes/set-up/monorepo-ci-github-actions" icon="github" /%}
|
||||
|
||||
{% /cards %}
|
||||
|
||||
|
||||
@@ -1,5 +1,66 @@
|
||||
# Enterprise Release Notes
|
||||
|
||||
### 2025.07.1
|
||||
|
||||
- Fix: auth redirect loop when using admin login
|
||||
- Fix: improvement to the flaky task retry mechanism
|
||||
|
||||
### 2025.07
|
||||
|
||||
##### Breaking Change
|
||||
|
||||
This upgrade includes a breaking change to the `nx-cloud` cluster: instead of a message queue, the `nx-api` pod needs a valid Valkey (Redis) connection string.
|
||||
|
||||
1. Install Valkey:
|
||||
1. You can either use the Bitnami chart: https://github.com/bitnami/charts/tree/main/bitnami/valkey
|
||||
2. Or for a simpler deployment, you can use the Valkey docker image directly: https://hub.docker.com/r/valkey/valkey/
|
||||
3. Or you can install it as a system service: https://valkey.io/topics/installation/
|
||||
2. Upgrade to the latest Helm chart `0.16.3`
|
||||
3. Apply the following values
|
||||
|
||||
```yaml
|
||||
enableMessageQueue: false
|
||||
|
||||
nxApi:
|
||||
# add these env vars to the nx-api
|
||||
deployment:
|
||||
env:
|
||||
- name: VALKEY_CLIENT_PROVIDER
|
||||
value: 'redisson'
|
||||
- name: VALKEY_PASSWORD
|
||||
valueFrom:
|
||||
# remember to apply this secret to your cluster
|
||||
secretKeyRef:
|
||||
name: valkey-secrets
|
||||
key: VALKEY_PASSWORD
|
||||
- name: VALKEY_PORT
|
||||
value: '6379'
|
||||
- name: VALKEY_PRIMARY_ADDRESS
|
||||
value: 'valkey'
|
||||
- name: VALKEY_USE_SENTINEL
|
||||
value: 'false'
|
||||
- name: VALKEY_USERNAME
|
||||
value: 'default'
|
||||
- name: NX_CLOUD_CONFORMANCE_RULES_BUCKET
|
||||
value:
|
||||
local-cluster-file-server # use this exact value if you are using the file server, otherwise point it to an S3/Azure/Google bucket
|
||||
# it will use the same role-based auth mechanism you already configured for the NxCloud cache
|
||||
# you can also use the same bucket name that you use for the cache (rules will just be stored in a sub-folder)
|
||||
```
|
||||
|
||||
##### Updates
|
||||
|
||||
- Feat: [Polygraph availability](/ci/recipes/enterprise/polygraph) (Conformance, Workspace Graph, Custom Workflows)
|
||||
- Feat: Nx 21 [continuous tasks](/blog/nx-21-continuous-tasks) support
|
||||
- Feat: Download artifacts button
|
||||
- When you view a task that just ran in CI on the NxCloud UI, there is now a button to download any artifacts that task produced directly from your browser
|
||||
- This is especially useful if you want to view screenshots/videos of failed e2e tests
|
||||
- Feat: [Self-healing CI](/ci/features/self-healing-ci)
|
||||
- Speak to your assigned DPE about testing this
|
||||
- You will need an Anthropic API key and access to Claude's servers
|
||||
- Feat: Dark Mode UI setting
|
||||
- Various fixes and stability improvements to DTE, agent visualization, and other areas of the app
|
||||
|
||||
### 2025.06.3
|
||||
|
||||
- Fix: add timeouts to GitLab requests
|
||||
|
||||
|
Before Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 136 KiB |
|
Before Width: | Height: | Size: 97 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 240 KiB |
|
Before Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 9.8 KiB |
|
Before Width: | Height: | Size: 84 KiB |
@@ -1,300 +0,0 @@
|
||||
---
|
||||
title: 'Circle CI Tutorial with Nx'
|
||||
description: In this tutorial you'll set up continuous integration with Circle CI and Nx
|
||||
---
|
||||
|
||||
# Circle CI with Nx
|
||||
|
||||
In this tutorial we're going to learn how to leverage Nx to setup a scalable CI pipeline on Circle CI. As repositories get bigger, making sure that the CI is fast, reliable and maintainable can get very challenging. Nx provides a solution.
|
||||
|
||||
- Nx reduces wasted time in CI with the [`affected` command](/ci/features/affected).
|
||||
- Nx Replay's [remote caching](/ci/features/remote-cache) will reuse task artifacts from different CI executions making sure you will never run the same computation twice.
|
||||
- Nx Agents [efficiently distribute tasks across machines](/ci/concepts/parallelization-distribution) ensuring constant CI time regardless of the repository size. The right number of machines is allocated for each PR to ensure good performance without wasting compute.
|
||||
- Nx Atomizer [automatically splits](/ci/features/split-e2e-tasks) large e2e tests to distribute them across machines. Nx can also automatically [identify and rerun flaky e2e tests](/ci/features/flaky-tasks).
|
||||
|
||||
## Example Repository
|
||||
|
||||
To follow along with this tutorial, we recommend using the [nx-shops sample repository](https://github.com/nrwl/nx-shops).
|
||||
|
||||
{% github-repository url="https://github.com/nrwl/nx-shops" /%}
|
||||
|
||||
The `nx-shops` repo is useful to demonstrate the value of the CI pipeline because it has the following characteristics:
|
||||
|
||||
- Multiple Nx projects with interdependencies
|
||||
- Defined lint, test, build and e2e tasks
|
||||
- Running all the tasks takes more than a minute to finish
|
||||
|
||||
To get started:
|
||||
|
||||
1. [Fork the nx-shop repo](https://github.com/nrwl/nx-shops/fork) and then clone it to your local machine
|
||||
|
||||
```shell
|
||||
git clone https://github.com/<your-username>/nx-shops.git
|
||||
```
|
||||
|
||||
2. Install dependencies (this repo uses [PNPM](https://pnpm.io/) but you should be able to also use any other package manager)
|
||||
|
||||
```shell
|
||||
pnpm i
|
||||
```
|
||||
|
||||
3. Make sure all tasks are working on your machine, by running lint, test, build and e2e on all projects of the workspace
|
||||
|
||||
```shell
|
||||
pnpm nx run-many -t lint test build
|
||||
```
|
||||
|
||||
## Connect to Circle CI
|
||||
|
||||
In order to use Circle CI, you need to [sign up and create an organization](https://circleci.com/docs/first-steps/#sign-up-and-create-an-org). Follow the steps in the Circle CI documentation to connect to your GitHub repository to a project.
|
||||
|
||||

|
||||
|
||||
The easiest way is to create a branch and PR in your GitHub repository. Note that a sample pipeline workflow file will be created, which we will overwrite in the next step.
|
||||
|
||||

|
||||
|
||||
Once the PR is created, merge it into your main branch.
|
||||
|
||||

|
||||
|
||||
And pull the changes locally:
|
||||
|
||||
```shell
|
||||
git pull
|
||||
```
|
||||
|
||||
## Create a CI Workflow
|
||||
|
||||
First, we'll create a new branch to start adding a CI workflow.
|
||||
|
||||
```shell
|
||||
git checkout -b setup-ci
|
||||
```
|
||||
|
||||
Now we can use an Nx generator to create a default CI workflow file.
|
||||
|
||||
```shell
|
||||
pnpm nx generate ci-workflow --ci=circleci
|
||||
```
|
||||
|
||||
This generator will overwrite Circle CI's default `.circleci/config.yml` file to create a CI pipeline that will run the `lint`, `test`, `build` and `e2e` tasks for projects that are affected by any given PR.
|
||||
|
||||
The key lines in the CI pipeline are:
|
||||
|
||||
```yml {% fileName=".circleci/config.yml" highlightLines=["27-29"] %}
|
||||
version: 2.1
|
||||
|
||||
orbs:
|
||||
nx: nrwl/nx@1.6.2
|
||||
|
||||
jobs:
|
||||
main:
|
||||
docker:
|
||||
- image: cimg/node:lts-browsers
|
||||
steps:
|
||||
- checkout
|
||||
|
||||
- run:
|
||||
name: Install PNPM
|
||||
command: npm install --prefix=$HOME/.local -g pnpm@8
|
||||
|
||||
# This enables task distribution via Nx Cloud
|
||||
# Run this command as early as possible, before dependencies are installed
|
||||
# Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun
|
||||
# Connect your workspace by running "nx connect" and uncomment this line to enable task distribution
|
||||
# - run: pnpm dlx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="e2e-ci"
|
||||
|
||||
- run: pnpm install --frozen-lockfile
|
||||
- nx/set-shas:
|
||||
main-branch-name: 'main'
|
||||
|
||||
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
|
||||
# - run: pnpm exec nx-cloud record -- echo Hello World
|
||||
- run: pnpm exec nx affected --base=$NX_BASE --head=$NX_HEAD -t lint test build e2e-ci
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
|
||||
ci:
|
||||
jobs:
|
||||
- main
|
||||
```
|
||||
|
||||
The [`nx affected` command](/ci/features/affected) will run the specified tasks only for projects that have been affected by a particular PR, which can save a lot of time as repositories grow larger.
|
||||
|
||||
Commit your changes and push your branch:
|
||||
|
||||
```shell
|
||||
git add .
|
||||
git commit -am "basic ci workflow"
|
||||
git push -u origin HEAD
|
||||
```
|
||||
|
||||
Open up a new PR to see the run on CircleCI. If you see a message about the `nrwl/nx` orb not being loaded, you need to enable third-party CircleCI orbs in your organization settings. In the Circle CI project dashboard, go to `Organization Settings -> Security` and select `Yes` under Orb Security Settings: Allow Uncertified Orbs.
|
||||
|
||||

|
||||
|
||||
{% callout type="warning" title="Create Your PR on Your Own Repository" %}
|
||||
Make sure that the PR you create is against your own repository's `main` branch - not the `nrwl/nx-shops` repository.
|
||||
{% /callout %}
|
||||
|
||||

|
||||
|
||||
Once CI is green, merge the PR.
|
||||
|
||||

|
||||
|
||||
And make sure to pull the changes locally:
|
||||
|
||||
```shell
|
||||
git checkout main
|
||||
git pull origin main
|
||||
```
|
||||
|
||||
The rest of the tutorial covers remote caching and distribution across multiple machines, which need Nx Cloud to be enabled. Let's set that up next.
|
||||
|
||||
## Connect to Nx Cloud
|
||||
|
||||
Nx Cloud is a companion app for your CI system that provides remote caching, task distribution, e2e test deflaking, better DX and more.
|
||||
|
||||
Let's connect your repository to Nx Cloud with the following command:
|
||||
|
||||
```shell
|
||||
pnpm nx connect
|
||||
```
|
||||
|
||||
A browser window will open to register your repository in your [Nx Cloud](https://cloud.nx.app) account. The link is also printed to the terminal if the windows does not open, or you closed it before finishing the steps. The app will guide you to create a PR to enable Nx Cloud on your repository.
|
||||
|
||||

|
||||
|
||||
Nx Cloud will create a comment on your PR that gives you a summary of the CI run and a link to dig into logs and understand everything that happened during the CI run.
|
||||
|
||||

|
||||
|
||||
Once the PR is green, merge it into your main branch.
|
||||
|
||||

|
||||
|
||||
And make sure you pull the latest changes locally:
|
||||
|
||||
```shell
|
||||
git pull
|
||||
```
|
||||
|
||||
You should now have an `nxCloudId` property specified in the `nx.json` file.
|
||||
|
||||
## Understand Remote Caching
|
||||
|
||||
[Nx Cloud](https://nx.app) provides [Nx Replay](/ci/features/remote-cache), which is a powerful, scalable and, very importantly, secure way to share task artifacts across machines. It lets you configure permissions and guarantees the cached artifacts cannot be tempered with.
|
||||
|
||||
[Nx Replay](/ci/features/remote-cache) is enabled by default. We can see it in action by running a few commands locally. First, let's build every project in the repository:
|
||||
|
||||
```shell
|
||||
pnpm nx run-many -t build
|
||||
```
|
||||
|
||||
Nx will store the output of those tasks locally in the `.nx/cache` folder and remotely in Nx Cloud. If someone else in the organization were to run the same `build` command on the same source code, they would receive the remotely cached outputs instead of re-running the `build` task themselves. We can simulate this by deleting the `.nx/cache` folder and re-running the `build` command.
|
||||
|
||||
```shell
|
||||
rm -rf .nx/cache
|
||||
pnpm nx run-many -t build
|
||||
```
|
||||
|
||||
The `build` tasks complete almost instantly, and you can see in the logs that Nx has pulled the outputs from the remote cache:
|
||||
|
||||
```
|
||||
❯ nx run-many -t build
|
||||
|
||||
✔ nx run shared-product-types:build [remote cache]
|
||||
✔ nx run shared-product-ui:build [remote cache]
|
||||
✔ nx run shared-header:build [remote cache]
|
||||
✔ nx run landing-page:build:production [remote cache]
|
||||
✔ nx run admin:build:production [remote cache]
|
||||
✔ nx run cart:build:production [remote cache]
|
||||
```
|
||||
|
||||
This remote cache is useful to speed up tasks when developing on a local machine, but it is incredibly useful for CI to be able share task results across different CI pipeline executions. When a small commit is added to a large PR, the CI is able to download the results for most of the tasks instead of recomputing everything from scratch.
|
||||
|
||||
You might also want to learn more about [how to fine-tune caching](/recipes/running-tasks/configure-inputs) to get even better results.
|
||||
|
||||
## Parallelize Tasks Across Multiple Machines Using Nx Agents
|
||||
|
||||
The affected command and Nx Replay help speed up the average CI time, but there will be some PRs that affect everything in the repository. The only way to speed up that worst case scenario is through efficient parallelization. The best way to parallelize CI with Nx is to use [Nx Agents](/ci/features/distribute-task-execution).
|
||||
|
||||
The Nx Agents feature
|
||||
|
||||
- takes a command (e.g. `nx affected -t build lint test e2e-ci`) and splits it into individual tasks which it then distributes across multiple agents
|
||||
- distributes tasks by considering the dependencies between them; e.g. if `e2e-ci` depends on `build`, Nx Cloud will make sure that `build` is executed before `e2e-ci`; it does this across machines
|
||||
- distributes tasks to optimize for CPU processing time and reduce idle time by taking into account historical data about how long each task takes to run
|
||||
- collects the results and logs of all the tasks and presents them in a single view
|
||||
- automatically shuts down agents when they are no longer needed
|
||||
|
||||
To enable Nx Agents, make sure the `nx-cloud start-ci-run` line is uncommented in the `.circleci/config.yml` file and the `nx affected` line runs the `e2e-ci` task instead of `e2e`.
|
||||
|
||||
```yml {% fileName=".circleci/config.yml" highlightLines=["21","29"] %}
|
||||
version: 2.1
|
||||
|
||||
orbs:
|
||||
nx: nrwl/nx@1.6.2
|
||||
|
||||
jobs:
|
||||
main:
|
||||
docker:
|
||||
- image: cimg/node:lts-browsers
|
||||
steps:
|
||||
- checkout
|
||||
|
||||
- run:
|
||||
name: Install PNPM
|
||||
command: npm install --prefix=$HOME/.local -g pnpm@8
|
||||
|
||||
# This enables task distribution via Nx Cloud
|
||||
# Run this command as early as possible, before dependencies are installed
|
||||
# Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun
|
||||
# Connect your workspace by running "nx connect" and uncomment this line to enable task distribution
|
||||
- run: pnpm dlx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="e2e-ci"
|
||||
|
||||
- run: pnpm install --frozen-lockfile
|
||||
- nx/set-shas:
|
||||
main-branch-name: 'main'
|
||||
|
||||
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
|
||||
# - run: pnpm exec nx-cloud record -- echo Hello World
|
||||
- run: pnpm exec nx affected --base=$NX_BASE --head=$NX_HEAD -t lint test build e2e-ci
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
|
||||
ci:
|
||||
jobs:
|
||||
- main
|
||||
```
|
||||
|
||||
We recommend you add this line right after you check out the repo, before installing node modules.
|
||||
|
||||
- `nx-cloud start-ci-run --distribute-on="3 linux-medium-js` lets Nx know that all the tasks after this line should use Nx Agents and that Nx Cloud should use three instances of the `linux-medium-js` launch template. See the separate reference on how to [configure a custom launch template](/ci/reference/launch-templates).
|
||||
- `--stop-agents-after="e2e-ci"` lets Nx Cloud know which line is the last command in this pipeline. Once there are no more e2e tasks for an agent to run, Nx Cloud will automatically shut them down. This way you're not wasting money on idle agents while a particularly long e2e task is running on a single agent.
|
||||
|
||||
Try it out by creating a new PR with the above changes.
|
||||
|
||||
```shell
|
||||
git checkout -b enable-distribution
|
||||
git commit -am 'enable task distribution'
|
||||
```
|
||||
|
||||

|
||||
|
||||
Once Circle CI starts, you can click on the Nx Cloud report to see what tasks agents are executing in real time.
|
||||
|
||||

|
||||
|
||||
With this pipeline configuration in place, no matter how large the repository scales, Nx Cloud will adjust and distribute tasks across agents in the optimal way. If CI pipelines start to slow down, just add some agents. One of the main advantages is that this pipeline definition is declarative. We tell Nx what commands to run, but not how to distribute them. That way even if our monorepo structure changes and evolves over time, the distribution will be taken care of by Nx Cloud.
|
||||
|
||||
## Next Steps
|
||||
|
||||
You now have a highly optimized CI configuration that will scale as your repository scales. See what else you can do with Nx Cloud.
|
||||
|
||||
- Configure [dynamic agent allocation](/ci/features/dynamic-agents)
|
||||
- Learn about [automatically splitting e2e tasks](/ci/features/split-e2e-tasks)
|
||||
- Identify and re-run [flaky tasks](/ci/features/flaky-tasks)
|
||||
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 120 KiB |
|
Before Width: | Height: | Size: 98 KiB |
|
Before Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 107 KiB |
@@ -1,263 +0,0 @@
|
||||
---
|
||||
title: 'GitHub Actions Tutorial with Nx'
|
||||
description: In this tutorial you'll set up continuous integration with GitHub Actions and Nx
|
||||
---
|
||||
|
||||
# GitHub Actions with Nx
|
||||
|
||||
In this tutorial we're going to learn how to leverage Nx to setup a scalable CI pipeline on GitHub Actions. As repositories get bigger, making sure that the CI is fast, reliable and maintainable can get very challenging. Nx provides a solution.
|
||||
|
||||
- Nx reduces wasted time in CI with the [`affected` command](/ci/features/affected).
|
||||
- Nx Replay's [remote caching](/ci/features/remote-cache) will reuse task artifacts from different CI executions making sure you will never run the same computation twice.
|
||||
- Nx Agents [efficiently distribute tasks across machines](/ci/concepts/parallelization-distribution) ensuring constant CI time regardless of the repository size. The right number of machines is allocated for each PR to ensure good performance without wasting compute.
|
||||
- Nx Atomizer [automatically splits](/ci/features/split-e2e-tasks) large e2e tests to distribute them across machines. Nx can also automatically [identify and rerun flaky e2e tests](/ci/features/flaky-tasks).
|
||||
|
||||
## Example Repository
|
||||
|
||||
To follow along with this tutorial, we recommend using the [nx-shops sample repository](https://github.com/nrwl/nx-shops).
|
||||
|
||||
{% github-repository url="https://github.com/nrwl/nx-shops" /%}
|
||||
|
||||
The `nx-shops` repo is useful to demonstrate the value of the CI pipeline because it has the following characteristics:
|
||||
|
||||
- Multiple Nx projects with interdependencies
|
||||
- Defined lint, test, build and e2e tasks
|
||||
- Running all the tasks takes more than a minute to finish
|
||||
|
||||
To get started:
|
||||
|
||||
1. [Fork the nx-shop repo](https://github.com/nrwl/nx-shops/fork) and then clone it to your local machine
|
||||
|
||||
```shell
|
||||
git clone https://github.com/<your-username>/nx-shops.git
|
||||
```
|
||||
|
||||
2. Install dependencies (this repo uses [PNPM](https://pnpm.io/) but you should be able to also use any other package manager)
|
||||
|
||||
```shell
|
||||
pnpm i
|
||||
```
|
||||
|
||||
3. Make sure all tasks are working on your machine, by running lint, test, build and e2e on all projects of the workspace
|
||||
|
||||
```shell
|
||||
pnpm nx run-many -t lint test build
|
||||
```
|
||||
|
||||
## Create a CI Workflow
|
||||
|
||||
First, we'll create a new branch to start adding a CI workflow.
|
||||
|
||||
```shell
|
||||
git checkout -b setup-ci
|
||||
```
|
||||
|
||||
Now we can use an Nx generator to create a default CI workflow file.
|
||||
|
||||
```shell
|
||||
pnpm nx generate ci-workflow --ci=github
|
||||
```
|
||||
|
||||
This generator creates a `.github/workflows/ci.yml` file that contains a CI pipeline that will run the `lint`, `test`, `build` and `e2e` tasks for projects that are affected by any given PR.
|
||||
|
||||
The key lines in the CI pipeline are:
|
||||
|
||||
```yml {% fileName=".github/workflows/ci.yml" highlightLines=["29-32"] %}
|
||||
name: CI
|
||||
# ...
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
filter: tree:0
|
||||
|
||||
- uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 9
|
||||
|
||||
# This enables task distribution via Nx Cloud
|
||||
# Run this command as early as possible, before dependencies are installed
|
||||
# Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun
|
||||
# Connect your workspace by running "nx connect" and uncomment this line to enable task distribution
|
||||
# - run: pnpm dlx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="e2e-ci"
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 20
|
||||
cache: 'pnpm'
|
||||
|
||||
- run: pnpm install --frozen-lockfile
|
||||
- uses: nrwl/nx-set-shas@v4
|
||||
|
||||
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
|
||||
# - run: pnpm exec nx-cloud record -- echo Hello World
|
||||
# Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
|
||||
- run: pnpm exec nx affected -t lint test build e2e-ci
|
||||
```
|
||||
|
||||
The [`nx affected` command](/ci/features/affected) will run the specified tasks only for projects that have been affected by a particular PR, which can save a lot of time as repositories grow larger.
|
||||
|
||||
Commit your changes and push your branch:
|
||||
|
||||
```shell
|
||||
git add .
|
||||
git commit -am "basic ci workflow"
|
||||
git push -u origin HEAD
|
||||
```
|
||||
|
||||
Create a pull request with the new branch and watch your CI in action.
|
||||
|
||||
{% callout type="warning" title="Create Your PR on Your Own Repository" %}
|
||||
Make sure that the PR you create is against your own repository's `main` branch - not the `nrwl/nx-shops` repository.
|
||||
{% /callout %}
|
||||
|
||||
Once CI is green, merge the PR.
|
||||
|
||||

|
||||
|
||||
The rest of the tutorial covers remote caching and distribution across multiple machines, which need Nx Cloud to be enabled. Let's set that up next.
|
||||
|
||||
## Connect to Nx Cloud
|
||||
|
||||
Nx Cloud is a companion app for your CI system that provides remote caching, task distribution, e2e test deflaking, better DX and more.
|
||||
|
||||
Let's connect your repository to Nx Cloud with the following command:
|
||||
|
||||
```shell
|
||||
pnpm nx connect
|
||||
```
|
||||
|
||||
A browser window will open to register your repository in your [Nx Cloud](https://cloud.nx.app) account. The link is also printed to the terminal if the windows does not open, or you closed it before finishing the steps. The app will guide you to create a PR to enable Nx Cloud on your repository.
|
||||
|
||||

|
||||
|
||||
Nx Cloud will create a comment on your PR that gives you a summary of the CI run and a link to dig into logs and understand everything that happened during the CI run.
|
||||
|
||||

|
||||
|
||||
Once the PR is green, merge it into your main branch.
|
||||
|
||||

|
||||
|
||||
And make sure you pull the latest changes locally:
|
||||
|
||||
```shell
|
||||
git pull
|
||||
```
|
||||
|
||||
You should now have an `nxCloudId` property specified in the `nx.json` file.
|
||||
|
||||
## Understand Remote Caching
|
||||
|
||||
[Nx Cloud](https://nx.app) provides [Nx Replay](/ci/features/remote-cache), which is a powerful, scalable and, very importantly, secure way to share task artifacts across machines. It lets you configure permissions and guarantees the cached artifacts cannot be tempered with.
|
||||
|
||||
[Nx Replay](/ci/features/remote-cache) is enabled by default. We can see it in action by running a few commands locally. First, let's build every project in the repository:
|
||||
|
||||
```shell
|
||||
pnpm nx run-many -t build
|
||||
```
|
||||
|
||||
Nx will store the output of those tasks locally in the `.nx/cache` folder and remotely in Nx Cloud. If someone else in the organization were to run the same `build` command on the same source code, they would receive the remotely cached outputs instead of re-running the `build` task themselves. We can simulate this by deleting the `.nx/cache` folder and re-running the `build` command.
|
||||
|
||||
```shell
|
||||
rm -rf .nx/cache
|
||||
pnpm nx run-many -t build
|
||||
```
|
||||
|
||||
The `build` tasks complete almost instantly, and you can see in the logs that Nx has pulled the outputs from the remote cache:
|
||||
|
||||
```
|
||||
❯ nx run-many -t build
|
||||
|
||||
✔ nx run shared-product-types:build [remote cache]
|
||||
✔ nx run shared-product-ui:build [remote cache]
|
||||
✔ nx run shared-header:build [remote cache]
|
||||
✔ nx run landing-page:build:production [remote cache]
|
||||
✔ nx run admin:build:production [remote cache]
|
||||
✔ nx run cart:build:production [remote cache]
|
||||
```
|
||||
|
||||
This remote cache is useful to speed up tasks when developing on a local machine, but it is incredibly useful for CI to be able share task results across different CI pipeline executions. When a small commit is added to a large PR, the CI is able to download the results for most of the tasks instead of recomputing everything from scratch.
|
||||
|
||||
You might also want to learn more about [how to fine-tune caching](/recipes/running-tasks/configure-inputs) to get even better results.
|
||||
|
||||
## Parallelize Tasks Across Multiple Machines Using Nx Agents
|
||||
|
||||
The affected command and Nx Replay help speed up the average CI time, but there will be some PRs that affect everything in the repository. The only way to speed up that worst case scenario is through efficient parallelization. The best way to parallelize CI with Nx is to use [Nx Agents](/ci/features/distribute-task-execution).
|
||||
|
||||
The Nx Agents feature
|
||||
|
||||
- takes a command (e.g. `nx affected -t build lint test e2e-ci`) and splits it into individual tasks which it then distributes across multiple agents
|
||||
- distributes tasks by considering the dependencies between them; e.g. if `e2e-ci` depends on `build`, Nx Cloud will make sure that `build` is executed before `e2e-ci`; it does this across machines
|
||||
- distributes tasks to optimize for CPU processing time and reduce idle time by taking into account historical data about how long each task takes to run
|
||||
- collects the results and logs of all the tasks and presents them in a single view
|
||||
- automatically shuts down agents when they are no longer needed
|
||||
|
||||
To enable Nx Agents, make sure the `nx-cloud start-ci-run` line is uncommented in the `.github/workflows/ci.yml` file and the `nx affected` line runs the `e2e-ci` task instead of `e2e`.
|
||||
|
||||
```yml {% fileName=".github/workflows/ci.yml" highlightLines=[19] %}
|
||||
name: CI
|
||||
# ...
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
filter: tree:0
|
||||
|
||||
- uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 9
|
||||
|
||||
# This enables task distribution via Nx Cloud
|
||||
# Run this command as early as possible, before dependencies are installed
|
||||
# Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun
|
||||
# Uncomment this line to enable task distribution
|
||||
- run: pnpm dlx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="e2e-ci"
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 20
|
||||
cache: 'pnpm'
|
||||
|
||||
- run: pnpm install --frozen-lockfile
|
||||
- uses: nrwl/nx-set-shas@v4
|
||||
|
||||
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
|
||||
# - run: pnpm exec nx-cloud record -- echo Hello World
|
||||
# Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
|
||||
- run: pnpm exec nx affected -t lint test build e2e-ci
|
||||
```
|
||||
|
||||
We recommend you add this line right after you check out the repo, before installing node modules.
|
||||
|
||||
- `nx-cloud start-ci-run --distribute-on="3 linux-medium-js` lets Nx know that all the tasks after this line should use Nx Agents and that Nx Cloud should use three instances of the `linux-medium-js` launch template. See the separate reference on how to [configure a custom launch template](/ci/reference/launch-templates).
|
||||
- `--stop-agents-after="e2e-ci"` lets Nx Cloud know which line is the last command in this pipeline. Once there are no more e2e tasks for an agent to run, Nx Cloud will automatically shut them down. This way you're not wasting money on idle agents while a particularly long e2e task is running on a single agent.
|
||||
|
||||
Try it out by creating a new PR with the above changes.
|
||||
|
||||
```shell
|
||||
git checkout -b enable-distribution
|
||||
git commit -am 'enable task distribution'
|
||||
```
|
||||
|
||||

|
||||
|
||||
Once GitHub Actions starts, you can click on the Nx Cloud report to see what tasks agents are executing in real time.
|
||||
|
||||

|
||||
|
||||
With this pipeline configuration in place, no matter how large the repository scales, Nx Cloud will adjust and distribute tasks across agents in the optimal way. If CI pipelines start to slow down, just add some agents. One of the main advantages is that this pipeline definition is declarative. We tell Nx what commands to run, but not how to distribute them. That way even if our monorepo structure changes and evolves over time, the distribution will be taken care of by Nx Cloud.
|
||||
|
||||
## Next Steps
|
||||
|
||||
You now have a highly optimized CI configuration that will scale as your repository scales. See what else you can do with Nx Cloud.
|
||||
|
||||
- Configure [dynamic agent allocation](/ci/features/dynamic-agents)
|
||||
- Learn about [automatically splitting e2e tasks](/ci/features/split-e2e-tasks)
|
||||
- Identify and re-run [flaky tasks](/ci/features/flaky-tasks)
|
||||
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 262 KiB |
|
Before Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 306 KiB |
|
Before Width: | Height: | Size: 101 KiB |
|
Before Width: | Height: | Size: 24 KiB |
@@ -61,13 +61,17 @@ For other MCP-compatible clients (that do not have Nx Console available) like Cl
|
||||
"servers": {
|
||||
"nx-mcp": {
|
||||
"command": "npx",
|
||||
"args": ["nx-mcp@latest", "/path/to/your/workspace"]
|
||||
"args": ["nx-mcp@latest"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Replace `/path/to/your/workspace` with the absolute path to your Nx workspace.
|
||||
For Claude Code:
|
||||
|
||||
```shell
|
||||
claude mcp add nx-mcp npx nx-mcp@latest
|
||||
```
|
||||
|
||||
## Powerful Use Cases
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ jobs:
|
||||
...
|
||||
- run: npx nx affected -t lint test build
|
||||
|
||||
- run: npx nx cloud fix-ci
|
||||
- run: npx nx-cloud fix-ci
|
||||
if: always()
|
||||
```
|
||||
|
||||
|
||||
@@ -26,13 +26,17 @@ For MCP-compatible clients like **Claude Desktop**, **Cursor**, or other AI assi
|
||||
"servers": {
|
||||
"nx-mcp": {
|
||||
"command": "npx",
|
||||
"args": ["nx-mcp@latest", "/path/to/your/workspace"]
|
||||
"args": ["nx-mcp@latest"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Replace `/path/to/your/workspace` with your actual workspace path.
|
||||
For Claude Code:
|
||||
|
||||
```shell
|
||||
claude mcp add nx-mcp npx nx-mcp@latest
|
||||
```
|
||||
|
||||
## What This Integration Enables
|
||||
|
||||
|
||||
@@ -12,12 +12,72 @@ Thanks to [Nx's modular architecture](/getting-started/intro), you can start wit
|
||||
Getting started is remarkably simple. You can add Nx to any existing project with a single command:
|
||||
|
||||
```shell
|
||||
nx init
|
||||
nx@latest init
|
||||
```
|
||||
|
||||
_(Note, make sure you have [Nx installed globally](/getting-started/installation) or use `npx` if you're in a JavaScript environment)_
|
||||
> _Note: make sure you have [Nx installed globally](/getting-started/installation) or use `npx` if you're in a JavaScript environment_
|
||||
|
||||
This command automatically detects your underlying workspace structure, whether it's a monorepo, a single project, or something in between. Nx will then ask you a series of targeted questions about your setup and preferences, using your answers to auto-configure itself seamlessly into your existing workspace. This intelligent setup process ensures you get the benefits of Nx with minimal configuration changes or disruption to your current development workflow.
|
||||
Whether a monorepo, single project or something in between, `nx init` walks you through adding and configuring Nx. You can pick a minimal approach or detailed guided setup. At the end you'll have an Nx workspace ready for anything!
|
||||
|
||||
## Next Steps
|
||||
|
||||
After initializing Nx, you can explore your workspace with the following commands:
|
||||
|
||||
- `nx graph` to view an interactive graph
|
||||
- `nx show projects` to see a list of all projects
|
||||
- `nx show project <project-name>` to view an interactive project detailed view
|
||||
- `nx run-many -t <target>` to run tasks with Nx, e.g. `nx run-many -t build`
|
||||
|
||||
### Update CI Configurations
|
||||
|
||||
Now that Nx is installed, you'll want to update CI configurations to leverage Nx. You can do this by changing previous commands to use `nx` instead.
|
||||
|
||||
For example, switching from `pnpm` commands to use `nx`
|
||||
|
||||
```diff {% fileName=".github/workflows/ci.yaml" %}
|
||||
- - run: pnpm run -r build
|
||||
- - run: pnpm run -r test
|
||||
+ - run: npx nx run-many -t test build
|
||||
```
|
||||
|
||||
You can directly invoke `package.json` scripts with `nx` as well
|
||||
|
||||
```diff {% fileName=".github/workflows/ci.yaml" %}
|
||||
- - run: npm run build
|
||||
- - run: npm run test
|
||||
+ - run: npx nx build
|
||||
+ - run: npx nx test
|
||||
```
|
||||
|
||||
[View CI provider specific setups](/ci/recipes/set-up) to learn more.
|
||||
|
||||
### Nx Cloud
|
||||
|
||||
{% callout type="check" title="How do I know if I enabled Nx Cloud?" %}
|
||||
Validate Nx Cloud is enabled by checking the `nx.json` file for `nxCloudId` property.
|
||||
You can add Nx Cloud at any point by running the `nx connect` command.
|
||||
{%/callout%}
|
||||
|
||||
After initializing Nx, you'll need to commit and push the changes to your repository.
|
||||
|
||||
Once your changes are pushed, you can finish setting up your workspace by clicking on the list printed to your terminal, or by visiting [Nx Cloud directly](https://cloud.nx.app/get-started?utm_source=nx.dev&utm_campaign=nx_init) and clicking _"Connect an existing Nx repository"_
|
||||
|
||||
To leverage Self Healing CI, you'll need to add the following to your CI configuration:
|
||||
|
||||
```diff {% fileName=".github/workflows/ci.yaml" %}
|
||||
- run: npx nx run-many -t lint test build
|
||||
+ # Enable Self Healing CI w/ Nx Cloud
|
||||
+ - run: npx nx fix-ci
|
||||
+ if: always()
|
||||
```
|
||||
|
||||
### Empower Your Editor
|
||||
|
||||
Enhance your developer experience by using the Nx Console editor extension.
|
||||
|
||||
{% install-nx-console /%}
|
||||
|
||||
## In-depth Guides
|
||||
|
||||
Here are some guides that give you more details based on the technology stack you're using:
|
||||
|
||||
|
||||
@@ -391,10 +391,13 @@ The `See all runs` link goes to a page with the progress and results of tasks th
|
||||
|
||||

|
||||
|
||||
For more information about how Nx can improve your CI pipeline, check out one of these detailed tutorials:
|
||||
For more information about how Nx can improve your CI pipeline, check out one of these guides:
|
||||
|
||||
- [Circle CI with Nx](/ci/intro/tutorials/circle)
|
||||
- [GitHub Actions with Nx](/ci/intro/tutorials/github-actions)
|
||||
- [GitHub Actions with Nx](/ci/recipes/set-up/monorepo-ci-github-actions)
|
||||
- [Circle CI with Nx](/ci/recipes/set-up/monorepo-ci-circle-ci)
|
||||
- [Azure Pipelines with Nx](/ci/recipes/set-up/monorepo-ci-azure)
|
||||
- [Bitbucket Pipelines with Nx](/ci/recipes/set-up/monorepo-ci-bitbucket-pipelines)
|
||||
- [GitLab with Nx](/ci/recipes/set-up/monorepo-ci-gitlab)
|
||||
|
||||
## Learn More
|
||||
|
||||
|
||||
@@ -409,8 +409,11 @@ The `See all runs` link goes to a page with the progress and results of tasks th
|
||||
|
||||
For more information about how Nx can improve your CI pipeline, check out one of these detailed tutorials:
|
||||
|
||||
- [Circle CI with Nx](/ci/intro/tutorials/circle)
|
||||
- [GitHub Actions with Nx](/ci/intro/tutorials/github-actions)
|
||||
- [GitHub Actions with Nx](/ci/recipes/set-up/monorepo-ci-github-actions)
|
||||
- [Circle CI with Nx](/ci/recipes/set-up/monorepo-ci-circle-ci)
|
||||
- [Azure Pipelines with Nx](/ci/recipes/set-up/monorepo-ci-azure)
|
||||
- [Bitbucket Pipelines with Nx](/ci/recipes/set-up/monorepo-ci-bitbucket-pipelines)
|
||||
- [GitLab with Nx](/ci/recipes/set-up/monorepo-ci-gitlab)
|
||||
|
||||
## Learn More
|
||||
|
||||
|
||||
@@ -211,10 +211,13 @@ The `See all runs` link goes to a page with the progress and results of tasks th
|
||||
|
||||

|
||||
|
||||
For more information about how Nx can improve your CI pipeline, check out one of these detailed tutorials:
|
||||
For more information about how Nx can improve your CI pipeline, check out one of these guides:
|
||||
|
||||
- [Circle CI with Nx](/ci/intro/tutorials/circle)
|
||||
- [GitHub Actions with Nx](/ci/intro/tutorials/github-actions)
|
||||
- [GitHub Actions with Nx](/ci/recipes/set-up/monorepo-ci-github-actions)
|
||||
- [Circle CI with Nx](/ci/recipes/set-up/monorepo-ci-circle-ci)
|
||||
- [Azure Pipelines with Nx](/ci/recipes/set-up/monorepo-ci-azure)
|
||||
- [Bitbucket Pipelines with Nx](/ci/recipes/set-up/monorepo-ci-bitbucket-pipelines)
|
||||
- [GitLab with Nx](/ci/recipes/set-up/monorepo-ci-gitlab)
|
||||
|
||||
## Learn More
|
||||
|
||||
|
||||
@@ -34,8 +34,6 @@ jobs:
|
||||
- checkout: self
|
||||
fetchDepth: 0
|
||||
fetchFilter: tree:0
|
||||
persistCredentials: true
|
||||
|
||||
# Set Azure Devops CLI default settings
|
||||
- bash: az devops configure --defaults organization=$(System.TeamFoundationCollectionUri) project=$(System.TeamProject)
|
||||
displayName: 'Set default Azure DevOps organization and project'
|
||||
@@ -54,22 +52,22 @@ jobs:
|
||||
env:
|
||||
AZURE_DEVOPS_EXT_PAT: $(System.AccessToken)
|
||||
|
||||
# Connect your workspace on nx.app and uncomment this to enable task distribution.
|
||||
# The "--stop-agents-after" is optional, but allows idle agents to shut down once the "e2e-ci" targets have been requested
|
||||
# - script: yarn nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="e2e-ci"
|
||||
# This enables task distribution via Nx Cloud
|
||||
# Run this command as early as possible, before dependencies are installed
|
||||
# Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun
|
||||
# Connect your workspace by running "nx connect" and uncomment this line to enable task distribution
|
||||
# - script: npx nx start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build"
|
||||
|
||||
- script: yarn install --frozen-lockfile
|
||||
- script: npm ci --legacy-peer-deps
|
||||
- script: git branch --track main origin/main
|
||||
condition: eq(variables['Build.Reason'], 'PullRequest')
|
||||
|
||||
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
|
||||
# This requires connecting your workspace to Nx Cloud. Run "nx connect" to get started w/ Nx Cloud
|
||||
# - script: yarn nx-cloud record -- nx format:check
|
||||
|
||||
# Without Nx Cloud, run format:check directly
|
||||
- script: yarn nx format:check
|
||||
- script: yarn nx affected --base=$(BASE_SHA) --head=$(HEAD_SHA) --targets lint test build
|
||||
- script: yarn nx affected --base=$(BASE_SHA) --head=$(HEAD_SHA) --parallel 1 e2e-ci
|
||||
# - script: npx nx-cloud record -- echo Hello World
|
||||
- script: npx nx affected --base=$(BASE_SHA) --head=$(HEAD_SHA) -t lint test build
|
||||
# Nx Cloud recommends fixes for failures to help you get CI green faster. Learn more: https://nx.dev/ci/features/self-healing-ci
|
||||
- script: npx nx fix-ci
|
||||
condition: always()
|
||||
```
|
||||
|
||||
## Get the Commit of the Last Successful Build
|
||||
|
||||
@@ -19,37 +19,41 @@ pipelines:
|
||||
- step:
|
||||
name: 'Build and test affected apps on Pull Requests'
|
||||
script:
|
||||
# This line enables distribution
|
||||
# The "--stop-agents-after" is optional, but allows idle agents to shut down once the "e2e-ci" targets have been requested
|
||||
- npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="e2e-ci"
|
||||
- npm ci
|
||||
- export NX_BRANCH=$BITBUCKET_PR_ID
|
||||
|
||||
# This enables task distribution via Nx Cloud
|
||||
# Run this command as early as possible, before dependencies are installed
|
||||
# Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun
|
||||
# Connect your workspace by running "nx connect" and uncomment this line to enable task distribution
|
||||
# - npx nx start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build"
|
||||
|
||||
- npm ci --legacy-peer-deps
|
||||
|
||||
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
|
||||
# This requires connecting your workspace to Nx Cloud. Run "nx connect" to get started w/ Nx Cloud
|
||||
# - npx nx-cloud record -- nx format:check
|
||||
# npx nx-cloud record -- echo Hello World
|
||||
- npx nx affected --base=origin/main -t lint test build
|
||||
# Nx Cloud recommends fixes for failures to help you get CI green faster. Learn more: https://nx.dev/ci/features/self-healing-ci
|
||||
|
||||
# Without Nx Cloud, run format:check directly
|
||||
- npx nx format:check
|
||||
- npx nx affected -t lint test build e2e-ci --base=origin/main
|
||||
after-script:
|
||||
- npx nx fix-ci
|
||||
|
||||
branches:
|
||||
main:
|
||||
- step:
|
||||
name: "Build and test affected apps on 'main' branch changes"
|
||||
name: 'Build and test affected apps on "main" branch changes'
|
||||
script:
|
||||
- export NX_BRANCH=$BITBUCKET_BRANCH
|
||||
# This line enables distribution
|
||||
# The "--stop-agents-after" is optional, but allows idle agents to shut down once the "e2e-ci" targets have been requested
|
||||
# - npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="e2e-ci"
|
||||
- npm ci
|
||||
# This enables task distribution via Nx Cloud
|
||||
# Run this command as early as possible, before dependencies are installed
|
||||
# Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun
|
||||
# Connect your workspace by running "nx connect" and uncomment this
|
||||
# - npx nx start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build"
|
||||
|
||||
- npm ci --legacy-peer-deps
|
||||
|
||||
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
|
||||
# This requires connecting your workspace to Nx Cloud. Run "nx connect" to get started w/ Nx Cloud
|
||||
# - npx nx-cloud record -- nx format:check
|
||||
|
||||
# Without Nx Cloud, run format:check directly
|
||||
- npx nx format:check
|
||||
- npx nx affected -t lint test build e2e-ci --base=HEAD~1
|
||||
# - npx nx-cloud record -- echo Hello World
|
||||
- npx nx affected -t lint test build --base=HEAD~1
|
||||
```
|
||||
|
||||
The `pull-requests` and `main` jobs implement the CI workflow.
|
||||
|
||||
@@ -19,22 +19,30 @@ jobs:
|
||||
- image: cimg/node:lts-browsers
|
||||
steps:
|
||||
- checkout
|
||||
# This line enables distribution
|
||||
# The "--stop-agents-after" is optional, but allows idle agents to shut down once the "e2e-ci" targets have been requested
|
||||
# - run: npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="e2e-ci"
|
||||
- run: npm ci
|
||||
|
||||
- nx/set-shas
|
||||
# This enables task distribution via Nx Cloud
|
||||
# Run this command as early as possible, before dependencies are installed
|
||||
# Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun
|
||||
# Connect your workspace by running "nx connect" and uncomment this line to enable task distribution
|
||||
# - run: npx nx start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build"
|
||||
|
||||
- run: npm ci --legacy-peer-deps
|
||||
- nx/set-shas:
|
||||
main-branch-name: 'main'
|
||||
|
||||
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
|
||||
# This requires connecting your workspace to Nx Cloud. Run "nx connect" to get started w/ Nx Cloud
|
||||
# - run: npx nx-cloud record -- nx format:check
|
||||
# - run: npx nx-cloud record -- echo Hello World
|
||||
- run:
|
||||
command: npx nx affected -t lint test build
|
||||
# Nx Cloud recommends fixes for failures to help you get CI green faster. Learn more: https://nx.dev/ci/features/self-healing-ci
|
||||
- run:
|
||||
command: npx nx fix-ci
|
||||
when: always
|
||||
|
||||
# Without Nx Cloud, run format:check directly
|
||||
- run: npx nx format:check
|
||||
- run: npx nx affected --base=$NX_BASE --head=$NX_HEAD -t lint test build e2e-ci
|
||||
workflows:
|
||||
build:
|
||||
version: 2
|
||||
|
||||
ci:
|
||||
jobs:
|
||||
- main
|
||||
```
|
||||
|
||||
@@ -9,14 +9,13 @@ Below is an example of a GitHub Actions setup, building, and testing only what i
|
||||
|
||||
```yaml {% fileName=".github/workflows/ci.yml" %}
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
# Change this if your primary branch is not main
|
||||
- main
|
||||
pull_request:
|
||||
|
||||
# Needed for nx-set-shas when run on the main branch
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
@@ -27,26 +26,30 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
filter: tree:0
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
# This enables task distribution via Nx Cloud
|
||||
# Run this command as early as possible, before dependencies are installed
|
||||
# Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun
|
||||
# Connect your workspace by running "nx connect" and uncomment this line to enable task distribution
|
||||
# - run: npx nx start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build"
|
||||
|
||||
# Cache node_modules
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
cache: 'npm'
|
||||
# This line enables distribution
|
||||
# The "--stop-agents-after" is optional, but allows idle agents to shut down once the "e2e-ci" targets have been requested
|
||||
# - run: npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="e2e-ci"
|
||||
- run: npm ci
|
||||
|
||||
- run: npm ci --legacy-peer-deps
|
||||
- uses: nrwl/nx-set-shas@v4
|
||||
|
||||
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
|
||||
# This requires connecting your workspace to Nx Cloud. Run "nx connect" to get started w/ Nx Cloud
|
||||
# - run: npx nx-cloud record -- nx format:check
|
||||
|
||||
# Without Nx Cloud, run format:check directly
|
||||
- run: npx nx format:check
|
||||
- run: npx nx affected -t lint test build e2e-ci
|
||||
# - run: npx nx-cloud record -- echo Hello World
|
||||
- run: npx nx affected -t lint test build
|
||||
# Nx Cloud recommends fixes for failures to help you get CI green faster. Learn more: https://nx.dev/ci/features/self-healing-ci
|
||||
- run: npx nx fix-ci
|
||||
if: always()
|
||||
```
|
||||
|
||||
### Get the Commit of the Last Successful Build
|
||||
|
||||
@@ -9,35 +9,31 @@ Below is an example of a GitLab setup, building and testing only what is affecte
|
||||
|
||||
```yaml {% fileName=".gitlab-ci.yml" %}
|
||||
image: node:20
|
||||
|
||||
variables:
|
||||
GIT_DEPTH: 0
|
||||
CI: 'true'
|
||||
|
||||
main:
|
||||
# Main job
|
||||
CI:
|
||||
interruptible: true
|
||||
only:
|
||||
- main
|
||||
- merge_requests
|
||||
cache:
|
||||
key:
|
||||
files:
|
||||
- package-lock.json
|
||||
paths:
|
||||
- .npm/
|
||||
script:
|
||||
# Connect your workspace on <%= nxCloudHost %> and uncomment this to enable task distribution.
|
||||
# The "--stop-agents-after" is optional, but allows idle agents to shut down once the "e2e-ci" targets have been requested
|
||||
# - npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="e2e-ci"
|
||||
# This enables task distribution via Nx Cloud
|
||||
# Run this command as early as possible, before dependencies are installed
|
||||
# Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun
|
||||
# Connect your workspace by running "nx connect" and uncomment this line to enable task distribution
|
||||
# - npx nx start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build"
|
||||
|
||||
- npm ci --cache .npm --prefer-offline
|
||||
- npm ci --legacy-peer-deps
|
||||
- NX_HEAD=$CI_COMMIT_SHA
|
||||
- NX_BASE=${CI_MERGE_REQUEST_DIFF_BASE_SHA:-$CI_COMMIT_BEFORE_SHA}
|
||||
|
||||
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
|
||||
# This requires connecting your workspace to Nx Cloud. Run "nx connect" to get started w/ Nx Cloud
|
||||
# - npx nx-cloud record -- nx format:check
|
||||
# - npx nx-cloud record -- echo Hello World
|
||||
- npx nx affected -t lint test build
|
||||
# Nx Cloud recommends fixes for failures to help you get CI green faster. Learn more: https://nx.dev/ci/features/self-healing-ci
|
||||
|
||||
# Without Nx Cloud, run format:check directly
|
||||
- npx nx format:check --base=$NX_BASE --head=$NX_HEAD
|
||||
- npx nx affected --base=$NX_BASE --head=$NX_HEAD -t lint test build e2e-ci
|
||||
after_script:
|
||||
- npx nx fix-ci
|
||||
```
|
||||
|
||||
@@ -152,7 +152,8 @@ The `@nx/gradle` is configured in the `plugins` array in `nx.json`.
|
||||
"testTargetName": "test",
|
||||
"classesTargetName": "classes",
|
||||
"buildTargetName": "build",
|
||||
"ciTestTargetName": "test-ci"
|
||||
"ciTestTargetName": "test-ci",
|
||||
"ciIntTestTargetName": "intTest-ci"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -161,23 +162,101 @@ The `@nx/gradle` is configured in the `plugins` array in `nx.json`.
|
||||
|
||||
Once a Gradle configuration file has been identified, the targets are created with the name you specify under `testTargetName`, `classesTargetName` or `buildTargetName` in the `nx.json` `plugins` array. The default names for the inferred targets are `test`, `classes` and `build`.
|
||||
|
||||
### Splitting Tests
|
||||
### Test Distribution
|
||||
|
||||
The `@nx/gradle` plugin will automatically split your testing tasks by test class if you provide a `ciTestTargetName`. You can read more about the Atomizer feature [here](/ci/features/split-e2e-tasks). Nx will create a task with the name that you specify which can be used in CI to run the tests for each test class in a distributed fashion.
|
||||
Nx provides powerful features for distributing tasks in CI, including test splitting (also known as atomization) and optimized build targets. For Gradle projects, this is facilitated by the `@nx/gradle` plugin, allowing you to run your tests and builds more efficiently in your Continuous Integration (CI) environment.
|
||||
|
||||
```json {% fileName="nx.json" highlightLines=[6] %}
|
||||
#### How to Set Up Test Distribution (Atomizer) in CI
|
||||
|
||||
To enable test distribution for your Gradle projects in CI, follow these steps:
|
||||
|
||||
1. **Generate CI Workflow**: Run the `ci-workflow` generator to set up the necessary CI configurations. This generator creates a GitHub Actions workflow file that integrates with Nx's distributed task execution capabilities.
|
||||
|
||||
```shell
|
||||
nx g @nx/gradle:ci-workflow
|
||||
```
|
||||
|
||||
This command will generate a workflow file (e.g., `.github/workflows/ci.yml`) tailored for your Nx workspace with Gradle projects.
|
||||
|
||||
2. **Configure `nx.json` for Atomizer**: Add or ensure the presence of `ciTestTargetName` or `ciIntTestTargetName` in the `@nx/gradle` plugin options within your `nx.json`.
|
||||
|
||||
```json {% fileName="nx.json" highlightLines=[6,7] %}
|
||||
{
|
||||
"plugins": [
|
||||
{
|
||||
"plugin": "@nx/gradle",
|
||||
"options": {
|
||||
"ciTestTargetName": "test-ci",
|
||||
"ciIntTestTargetName": "intTest-ci"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Setting these options turns on the atomizer feature in CI. Nx will automatically split your testing tasks (unit and integration tests, respectively) by test class, allowing them to be run in a distributed fashion across your CI agents.
|
||||
|
||||
3. **Update CI Workflow Command**: In your generated CI workflow file, modify the command used to run affected tasks. Instead of using a generic `build` target, leverage the `build-ci` target provided by the `@nx/gradle` plugin:
|
||||
|
||||
```shell
|
||||
# Before:
|
||||
# ./nx affected --base=$NX_BASE --head=$NX_HEAD -t build
|
||||
|
||||
# After:
|
||||
./nx affected --base=$NX_BASE --head=$NX_HEAD -t build-ci
|
||||
```
|
||||
|
||||
This ensures that your CI pipeline utilizes the optimized `build-ci` target, which is designed to integrate seamlessly with Nx's test distribution and caching mechanisms.
|
||||
|
||||
#### The `ci-workflow` Generator
|
||||
|
||||
The `@nx/gradle:ci-workflow` generator is a utility that automates the setup of a CI workflow for your Nx workspace containing Gradle projects. It creates a `.github/workflows` file (or equivalent for other CI providers) that includes steps for checking out code, setting up Java and Gradle, restoring caches, and running affected Nx tasks. Its primary purpose is to streamline the integration of Nx's CI features, such as distributed task execution and caching, into your existing CI pipeline.
|
||||
|
||||
#### The `build-ci` Target
|
||||
|
||||
The `@nx/gradle` plugin can create a `build-ci` target that is specifically designed for use in CI environments. This target allows for a more optimized and consistent build process by ensuring that the `check` task is rewired to its CI counterpart (`check-ci`), which also implies that test tasks (`test` and `intTest`) are rewired to their atomized `test-ci` and `intTest-ci` counterparts respectively.
|
||||
|
||||
##### What is it?
|
||||
|
||||
The `build-ci` target is a synthetic Nx target that acts as a placeholder for your Gradle `build` task in a CI context. Instead of directly running the `build` task, the `build-ci` target ensures that the `check` task (a dependency of `build`) first executes its CI-optimized version (`check-ci`), which in turn uses the split/atomized test tasks (`test-ci`, `intTest-ci`). This allows for distributed execution of tests and efficient caching in CI.
|
||||
|
||||
##### How to Enable?
|
||||
|
||||
To enable the `build-ci` target, you need to configure `ciTestTargetName` or `ciIntTestTargetName` in the `@nx/gradle` plugin options in your `nx.json`.
|
||||
|
||||
For example:
|
||||
|
||||
```json {% fileName="nx.json" %}
|
||||
{
|
||||
"plugins": [
|
||||
{
|
||||
"plugin": "@nx/gradle",
|
||||
"options": {
|
||||
"ciTestTargetName": "test-ci"
|
||||
"ciTestTargetName": "test-ci",
|
||||
"ciBuildTargetName": "build-ci"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
When `ciTestTargetName` (or `ciIntTestTargetName`) is set, the `build-ci` target is automatically created if the `build` task exists for a given Gradle project.
|
||||
|
||||
##### Expected Behavior
|
||||
|
||||
When you run `nx build-ci <your-gradle-project>`, Nx will:
|
||||
|
||||
1. Execute the `check-ci` task (if defined) instead of the standard `check` task.
|
||||
2. The `check-ci` task will, in turn, trigger the atomized test tasks (`test-ci` and `intTest-ci`) if they are configured.
|
||||
3. The `build-ci` target itself will use the `nx:noop` executor, meaning it doesn't execute a direct Gradle command, but rather relies on its dependencies (`check-ci`) to orchestrate the build process in a CI-friendly manner.
|
||||
4. The `build-ci` target is cacheable.
|
||||
|
||||
This setup ensures that your build process in CI leverages Nx's caching and distribution capabilities effectively.
|
||||
|
||||
##### How to Turn it Off?
|
||||
|
||||
To disable the `build-ci` target, simply remove the `ciBuildTargetName` option from the `@nx/gradle` plugin configuration in your `nx.json` file. If `ciTestTargetName` and `ciIntTestTargetName` are also removed, then the special CI targets for tests and check will also be turned off.
|
||||
|
||||
### Continuous Tasks
|
||||
|
||||
Gradle doesn't have a standard way to identify tasks which are [continuous](/reference/project-configuration#continuous), like `bootRun` for serving a Spring Boot project. To ensure Nx handles these continuous tasks correctly, you can explicitly mark them as continuous.
|
||||
|
||||
@@ -818,9 +818,6 @@
|
||||
- [CI with Nx](/ci/intro/ci-with-nx)
|
||||
- [Why Nx Cloud?](/ci/intro/why-nx-cloud)
|
||||
- [Connect to Nx Cloud](/ci/intro/connect-to-nx-cloud)
|
||||
- [Tutorials](/ci/intro/tutorials)
|
||||
- [Circle CI with Nx](/ci/intro/tutorials/circle)
|
||||
- [GitHub Actions with Nx](/ci/intro/tutorials/github-actions)
|
||||
- [Features](/ci/features)
|
||||
- [AI-Powered Self-Healing CI](/ci/features/self-healing-ci)
|
||||
- [Use Remote Caching (Nx Replay)](/ci/features/remote-cache)
|
||||
|
||||
@@ -5,15 +5,15 @@ description: In this tutorial you'll create a frontend-focused workspace with Nx
|
||||
|
||||
# Building and Testing Angular Apps in Nx
|
||||
|
||||
In this tutorial, you'll learn how to create a new Angular monorepo using the Nx platform.
|
||||
This tutorial walks you through creating an Angular monorepo with Nx. You'll build a small example application to understand the core concepts and workflows.
|
||||
|
||||
What will you learn?
|
||||
What you'll learn:
|
||||
|
||||
- how to create a new Angular workspace with [GitHub Actions](https://github.com/features/actions) preconfigured
|
||||
- how to run a single task (i.e. serve your app) or run multiple tasks in parallel
|
||||
- how to modularize your codebase with local libraries for better code organization
|
||||
- how to benefit from caching that works both locally and in CI
|
||||
- how to set up self-healing CI to apply fixes directly from your local editor
|
||||
- How to structure multiple Angular apps and libraries in a single repository
|
||||
- How Nx's caching speeds up your local development and CI pipelines
|
||||
- How to run builds, tests, and serve commands efficiently across multiple projects
|
||||
- How to share UI components and utilities between Angular applications
|
||||
- How to fix CI failures directly from your editor with Nx Cloud
|
||||
|
||||
## Prerequisite: Tutorial Setup
|
||||
|
||||
@@ -23,9 +23,9 @@ This tutorial requires a [GitHub account](https://github.com) to demonstrate the
|
||||
|
||||
### Step 1: Creating a new Nx Angular workspace
|
||||
|
||||
Let's start by creating a new Angular monorepo with Nx Cloud and GitHub Actions preconfigured. You'll be guided through an interactive setup process to create your workspace. After completing the setup, return here to continue with this tutorial.
|
||||
Let's create your workspace. The setup process takes about 2 minutes and will configure Angular, testing, and CI/CD automatically.
|
||||
|
||||
{% call-to-action title="Create a new Angular monorepo" url="https://cloud.nx.app/create-nx-workspace?preset=angular" description="With Nx and GitHub Actions fully set up" /%}
|
||||
{% call-to-action title="Set up your Angular workspace" url="https://cloud.nx.app/create-nx-workspace?preset=angular" description="Interactive setup with Angular and CI preconfigured" /%}
|
||||
|
||||
### Step 2: Verify Your Setup
|
||||
|
||||
|
||||
@@ -5,15 +5,15 @@ description: In this tutorial you'll add Nx to an existing Gradle repo
|
||||
|
||||
# Gradle Tutorial
|
||||
|
||||
In this tutorial, you'll learn how to add Nx to a repository with an existing Gradle setup.
|
||||
This tutorial walks you through adding Nx to an existing Gradle project. You'll see how Nx enhances your Gradle workflow with caching, task orchestration, and better developer experience.
|
||||
|
||||
What will you learn?
|
||||
What you'll learn:
|
||||
|
||||
- how to add Nx to a Gradle project
|
||||
- how to run a single task (i.e. serve your app) or run multiple tasks in parallel
|
||||
- how to leverage code generators to scaffold components
|
||||
- how to modularize your codebase and impose architectural constraints for better maintainability
|
||||
- [how to speed up CI with Nx Cloud ⚡](#fast-ci)
|
||||
- How to integrate Nx with your existing Gradle build system
|
||||
- How Nx's caching speeds up your Gradle builds locally and in CI
|
||||
- How to visualize and understand project dependencies in your Gradle workspace
|
||||
- How to run Gradle tasks more efficiently with Nx's task runner
|
||||
- How to set up Nx Cloud for distributed caching and faster CI
|
||||
|
||||
## Prerequisites
|
||||
|
||||
@@ -350,10 +350,13 @@ The `See all runs` link goes to a page with the progress and results of tasks th
|
||||
|
||||

|
||||
|
||||
For more information about how Nx can improve your CI pipeline, check out one of these detailed tutorials:
|
||||
For more information about how Nx can improve your CI pipeline, check out one of these guides:
|
||||
|
||||
- [Circle CI with Nx](/ci/intro/tutorials/circle)
|
||||
- [GitHub Actions with Nx](/ci/intro/tutorials/github-actions)
|
||||
- [GitHub Actions with Nx](/ci/recipes/set-up/monorepo-ci-github-actions)
|
||||
- [Circle CI with Nx](/ci/recipes/set-up/monorepo-ci-circle-ci)
|
||||
- [Azure Pipelines with Nx](/ci/recipes/set-up/monorepo-ci-azure)
|
||||
- [Bitbucket Pipelines with Nx](/ci/recipes/set-up/monorepo-ci-bitbucket-pipelines)
|
||||
- [GitLab with Nx](/ci/recipes/set-up/monorepo-ci-gitlab)
|
||||
|
||||
## Summary
|
||||
|
||||
|
||||
@@ -5,15 +5,15 @@ description: In this tutorial you'll create a frontend-focused workspace with Nx
|
||||
|
||||
# Building and Testing React Apps in Nx
|
||||
|
||||
In this tutorial, you'll learn how to create a new React monorepo using the Nx platform.
|
||||
This tutorial walks you through creating a React monorepo with Nx. You'll build a small example application to understand the core concepts and workflows.
|
||||
|
||||
What will you learn?
|
||||
What you'll learn:
|
||||
|
||||
- how to create a new React workspace with [GitHub Actions](https://github.com/features/actions) preconfigured
|
||||
- how to run a single task (i.e. serve your app) or run multiple tasks in parallel
|
||||
- how to modularize your codebase with local libraries for better code organization
|
||||
- how to benefit from caching that works both locally and in CI
|
||||
- how to set up self-healing CI to apply fixes directly from your local editor
|
||||
- How to structure multiple React apps and libraries in a single repository
|
||||
- How Nx's caching speeds up your local development and CI pipelines
|
||||
- How to run builds, tests, and serve commands efficiently across multiple projects
|
||||
- How to share React components and hooks between applications
|
||||
- How to fix CI failures directly from your editor with Nx Cloud
|
||||
|
||||
## Prerequisite: Tutorial Setup
|
||||
|
||||
@@ -23,9 +23,9 @@ This tutorial requires a [GitHub account](https://github.com) to demonstrate the
|
||||
|
||||
### Step 1: Creating a new Nx React workspace
|
||||
|
||||
Let's start by creating a new React monorepo with Nx Cloud and GitHub Actions preconfigured. You'll be guided through an interactive setup process to create your workspace. After completing the setup, return here to continue with this tutorial.
|
||||
Let's create your workspace. The setup process takes about 2 minutes and will configure React, testing, and CI/CD automatically.
|
||||
|
||||
{% call-to-action title="Create a new React monorepo" url="https://cloud.nx.app/create-nx-workspace?preset=react" description="With Nx and GitHub Actions fully set up" /%}
|
||||
{% call-to-action title="Set up your React workspace" url="https://cloud.nx.app/create-nx-workspace?preset=react" description="Interactive setup with React and CI preconfigured" /%}
|
||||
|
||||
### Step 2: Verify Your Setup
|
||||
|
||||
|
||||
@@ -5,17 +5,17 @@ description: In this tutorial you'll create a TypeScript monorepo with Nx.
|
||||
|
||||
# Building and Testing TypeScript Packages in Nx
|
||||
|
||||
In this tutorial, you'll learn how to create a new TypeScript monorepo using the Nx platform.
|
||||
This tutorial walks you through creating a TypeScript monorepo with Nx. You'll build a small example project to understand the core concepts and workflows.
|
||||
|
||||
What will you learn?
|
||||
What you'll learn:
|
||||
|
||||
- how to create a new TypeScript workspace with [GitHub Actions](https://github.com/features/actions) preconfigured
|
||||
- how to run a single task (i.e. build your packages) or run multiple tasks in parallel
|
||||
- how to modularize your codebase with local libraries for better code organization
|
||||
- how to benefit from caching that works both locally and in CI
|
||||
- how to set up self-healing CI to apply fixes directly from your local editor
|
||||
- How to structure multiple TypeScript packages in a single repository
|
||||
- How Nx's caching speeds up your local development and CI pipelines
|
||||
- How to run builds and tests efficiently across multiple packages
|
||||
- How to share code between packages using local libraries
|
||||
- How to fix CI failures directly from your editor with Nx Cloud
|
||||
|
||||
## Prerequisite: Tutorial Setup
|
||||
## Ready to start?
|
||||
|
||||
{% callout type="note" title="Prerequisites" %}
|
||||
This tutorial requires a [GitHub account](https://github.com) to demonstrate the full value of **Nx** - including task running, caching, and CI integration.
|
||||
@@ -23,9 +23,9 @@ This tutorial requires a [GitHub account](https://github.com) to demonstrate the
|
||||
|
||||
### Step 1: Creating a new Nx TypeScript workspace
|
||||
|
||||
Let's start by creating a new TypeScript monorepo with Nx Cloud and GitHub Actions preconfigured. You'll be guided through an interactive setup process to create your workspace. After completing the setup, return here to continue with this tutorial.
|
||||
Let's create your workspace. The setup process takes about 2 minutes and will configure TypeScript, testing, and CI/CD automatically.
|
||||
|
||||
{% call-to-action title="Create a new TypeScript monorepo" url="https://cloud.nx.app/create-nx-workspace?preset=typescript" description="With Nx and GitHub Actions fully set up" /%}
|
||||
{% call-to-action title="Set up your Nx workspace now" url="<https://cloud.nx.app/create-nx-workspace?preset=typescript>" description="Interactive setup with TypeScript and CI preconfigured" /%}
|
||||
|
||||
### Step 2: Verify Your Setup
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ describe('nx init (for NestCLI - legacy)', () => {
|
||||
}
|
||||
);
|
||||
|
||||
expect(output).toContain('Run it again to replay the cached computation.');
|
||||
expect(output).toContain('Learn more about what to do next');
|
||||
|
||||
// nest-cli.json is removed
|
||||
expect(exists(`${projectRoot}/nest-cli.json`)).toBeFalsy();
|
||||
|
||||
@@ -42,7 +42,7 @@ describe('nx init (NPM repo - legacy)', () => {
|
||||
pmc.runUninstalledPackage
|
||||
} nx@${getPublishedVersion()} init --cacheable=echo --no-interactive`
|
||||
);
|
||||
expect(output).toContain('Run it again to replay the cached computation.');
|
||||
expect(output).toContain('Learn more about what to do next');
|
||||
|
||||
expect(runCLI('echo')).toContain('123');
|
||||
renameFile('nx.json', 'nx.json.old');
|
||||
|
||||
@@ -139,7 +139,7 @@ xdescribe('nx release circular dependencies', () => {
|
||||
"name": "@proj/{project-name}",
|
||||
- "version": "1.0.0",
|
||||
+ "version": "2.0.0",
|
||||
"scripts": {
|
||||
"exports": {
|
||||
|
||||
"dependencies": {
|
||||
- "@proj/{project-name}": "1.0.0"
|
||||
@@ -152,7 +152,7 @@ xdescribe('nx release circular dependencies', () => {
|
||||
"name": "@proj/{project-name}",
|
||||
- "version": "1.0.0",
|
||||
+ "version": "2.0.0",
|
||||
"scripts": {
|
||||
"exports": {
|
||||
|
||||
"devDependencies": {
|
||||
- "@proj/{project-name}": "1.0.0"
|
||||
@@ -321,7 +321,7 @@ xdescribe('nx release circular dependencies', () => {
|
||||
"name": "@proj/{project-name}",
|
||||
- "version": "1.0.0",
|
||||
+ "version": "2.0.0",
|
||||
"scripts": {
|
||||
"exports": {
|
||||
|
||||
"dependencies": {
|
||||
- "@proj/{project-name}": "1.0.0"
|
||||
@@ -334,7 +334,7 @@ xdescribe('nx release circular dependencies', () => {
|
||||
"name": "@proj/{project-name}",
|
||||
- "version": "1.0.0",
|
||||
+ "version": "2.0.0",
|
||||
"scripts": {
|
||||
"exports": {
|
||||
|
||||
"devDependencies": {
|
||||
- "@proj/{project-name}": "1.0.0"
|
||||
@@ -504,7 +504,7 @@ xdescribe('nx release circular dependencies', () => {
|
||||
"name": "@proj/{project-name}",
|
||||
- "version": "1.0.0",
|
||||
+ "version": "2.0.0",
|
||||
"scripts": {
|
||||
"exports": {
|
||||
|
||||
"dependencies": {
|
||||
- "@proj/{project-name}": "1.0.0"
|
||||
@@ -517,7 +517,7 @@ xdescribe('nx release circular dependencies', () => {
|
||||
"name": "@proj/{project-name}",
|
||||
- "version": "1.0.0",
|
||||
+ "version": "2.0.0",
|
||||
"scripts": {
|
||||
"exports": {
|
||||
|
||||
"devDependencies": {
|
||||
- "@proj/{project-name}": "1.0.0"
|
||||
@@ -681,7 +681,7 @@ xdescribe('nx release circular dependencies', () => {
|
||||
"name": "@proj/{project-name}",
|
||||
- "version": "1.0.0",
|
||||
+ "version": "2.0.0",
|
||||
"scripts": {
|
||||
"exports": {
|
||||
|
||||
}
|
||||
+
|
||||
@@ -807,7 +807,7 @@ xdescribe('nx release circular dependencies', () => {
|
||||
"name": "@proj/{project-name}",
|
||||
- "version": "1.0.0",
|
||||
+ "version": "2.0.0",
|
||||
"scripts": {
|
||||
"exports": {
|
||||
|
||||
"dependencies": {
|
||||
- "@proj/{project-name}": "1.0.0"
|
||||
@@ -820,7 +820,7 @@ xdescribe('nx release circular dependencies', () => {
|
||||
"name": "@proj/{project-name}",
|
||||
- "version": "1.0.0",
|
||||
+ "version": "2.0.0",
|
||||
"scripts": {
|
||||
"exports": {
|
||||
|
||||
"devDependencies": {
|
||||
- "@proj/{project-name}": "1.0.0"
|
||||
@@ -992,7 +992,7 @@ xdescribe('nx release circular dependencies', () => {
|
||||
"name": "@proj/{project-name}",
|
||||
- "version": "1.0.0",
|
||||
+ "version": "2.0.0",
|
||||
"scripts": {
|
||||
"exports": {
|
||||
|
||||
"dependencies": {
|
||||
- "@proj/{project-name}": "1.0.0"
|
||||
@@ -1005,7 +1005,7 @@ xdescribe('nx release circular dependencies', () => {
|
||||
"name": "@proj/{project-name}",
|
||||
- "version": "1.0.0",
|
||||
+ "version": "1.0.1",
|
||||
"scripts": {
|
||||
"exports": {
|
||||
|
||||
"devDependencies": {
|
||||
- "@proj/{project-name}": "1.0.0"
|
||||
|
||||
@@ -134,7 +134,7 @@ describe('nx release - independent projects', () => {
|
||||
"name": "@proj/{project-name}",
|
||||
- "version": "0.0.0",
|
||||
+ "version": "999.9.9-package.1",
|
||||
"scripts": {
|
||||
"exports": {
|
||||
|
||||
|
||||
NX Staging changed files with git
|
||||
@@ -162,7 +162,7 @@ describe('nx release - independent projects', () => {
|
||||
"name": "@proj/{project-name}",
|
||||
- "version": "0.0.0",
|
||||
+ "version": "999.9.9-package.2",
|
||||
"scripts": {
|
||||
"exports": {
|
||||
|
||||
}
|
||||
+
|
||||
@@ -200,13 +200,13 @@ describe('nx release - independent projects', () => {
|
||||
"name": "@proj/{project-name}",
|
||||
- "version": "0.0.0",
|
||||
+ "version": "999.9.9-package.3",
|
||||
"scripts": {
|
||||
"exports": {
|
||||
|
||||
|
||||
"name": "@proj/{project-name}",
|
||||
- "version": "999.9.9-package.2",
|
||||
+ "version": "999.9.9",
|
||||
"scripts": {
|
||||
"exports": {
|
||||
|
||||
"dependencies": {
|
||||
- "@proj/{project-name}": "0.0.0"
|
||||
@@ -249,7 +249,7 @@ describe('nx release - independent projects', () => {
|
||||
"name": "@proj/{project-name}",
|
||||
- "version": "999.9.9-version-git-operations-test.1",
|
||||
+ "version": "999.9.9-version-git-operations-test.2",
|
||||
"scripts": {
|
||||
"exports": {
|
||||
|
||||
|
||||
Skipped lock file update because {package-manager} workspaces are not enabled.
|
||||
@@ -340,19 +340,19 @@ describe('nx release - independent projects', () => {
|
||||
"name": "@proj/{project-name}",
|
||||
- "version": "999.9.9-package.3",
|
||||
+ "version": "999.9.9-version-git-operations-test.3",
|
||||
"scripts": {
|
||||
"exports": {
|
||||
|
||||
|
||||
"name": "@proj/{project-name}",
|
||||
- "version": "999.9.9-version-git-operations-test.2",
|
||||
+ "version": "999.9.9-version-git-operations-test.3",
|
||||
"scripts": {
|
||||
"exports": {
|
||||
|
||||
|
||||
"name": "@proj/{project-name}",
|
||||
- "version": "999.9.9",
|
||||
+ "version": "999.9.9-version-git-operations-test.3",
|
||||
"scripts": {
|
||||
"exports": {
|
||||
|
||||
"dependencies": {
|
||||
- "@proj/{project-name}": "999.9.9-package.3"
|
||||
|
||||
@@ -143,19 +143,19 @@ describe('nx release multiple release branches', () => {
|
||||
"name": "@proj/{project-name}",
|
||||
- "version": "0.0.0",
|
||||
+ "version": "0.0.7",
|
||||
"scripts": {
|
||||
"exports": {
|
||||
|
||||
|
||||
"name": "@proj/{project-name}",
|
||||
- "version": "0.0.0",
|
||||
+ "version": "0.0.7",
|
||||
"scripts": {
|
||||
"exports": {
|
||||
|
||||
|
||||
"name": "@proj/{project-name}",
|
||||
- "version": "0.0.0",
|
||||
+ "version": "0.0.7",
|
||||
"scripts": {
|
||||
"exports": {
|
||||
|
||||
|
||||
NX Committing changes with git
|
||||
@@ -189,7 +189,7 @@ describe('nx release multiple release branches', () => {
|
||||
"name": "@proj/{project-name}",
|
||||
- "version": "0.0.7",
|
||||
+ "version": "0.1.0",
|
||||
"scripts": {
|
||||
"exports": {
|
||||
|
||||
}
|
||||
+
|
||||
@@ -198,13 +198,13 @@ describe('nx release multiple release branches', () => {
|
||||
"name": "@proj/{project-name}",
|
||||
- "version": "0.0.7",
|
||||
+ "version": "0.1.0",
|
||||
"scripts": {
|
||||
"exports": {
|
||||
|
||||
|
||||
"name": "@proj/{project-name}",
|
||||
- "version": "0.0.7",
|
||||
+ "version": "0.1.0",
|
||||
"scripts": {
|
||||
"exports": {
|
||||
|
||||
|
||||
NX Committing changes with git
|
||||
@@ -238,19 +238,19 @@ describe('nx release multiple release branches', () => {
|
||||
"name": "@proj/{project-name}",
|
||||
- "version": "0.0.7",
|
||||
+ "version": "0.0.8",
|
||||
"scripts": {
|
||||
"exports": {
|
||||
|
||||
|
||||
"name": "@proj/{project-name}",
|
||||
- "version": "0.0.7",
|
||||
+ "version": "0.0.8",
|
||||
"scripts": {
|
||||
"exports": {
|
||||
|
||||
|
||||
"name": "@proj/{project-name}",
|
||||
- "version": "0.0.7",
|
||||
+ "version": "0.0.8",
|
||||
"scripts": {
|
||||
"exports": {
|
||||
|
||||
|
||||
NX Committing changes with git
|
||||
@@ -328,7 +328,7 @@ describe('nx release multiple release branches', () => {
|
||||
"name": "@proj/{project-name}",
|
||||
- "version": "0.0.0",
|
||||
+ "version": "0.1.0",
|
||||
"scripts": {
|
||||
"exports": {
|
||||
|
||||
}
|
||||
+
|
||||
@@ -337,13 +337,13 @@ describe('nx release multiple release branches', () => {
|
||||
"name": "@proj/{project-name}",
|
||||
- "version": "0.0.0",
|
||||
+ "version": "0.1.0",
|
||||
"scripts": {
|
||||
"exports": {
|
||||
|
||||
|
||||
"name": "@proj/{project-name}",
|
||||
- "version": "0.0.0",
|
||||
+ "version": "0.1.0",
|
||||
"scripts": {
|
||||
"exports": {
|
||||
|
||||
|
||||
NX Committing changes with git
|
||||
@@ -377,13 +377,13 @@ describe('nx release multiple release branches', () => {
|
||||
"name": "@proj/{project-name}",
|
||||
- "version": "0.0.0",
|
||||
+ "version": "1.0.0",
|
||||
"scripts": {
|
||||
"exports": {
|
||||
|
||||
|
||||
"name": "@proj/{project-name}",
|
||||
- "version": "0.0.0",
|
||||
+ "version": "1.0.0",
|
||||
"scripts": {
|
||||
"exports": {
|
||||
|
||||
}
|
||||
+
|
||||
@@ -392,7 +392,7 @@ describe('nx release multiple release branches', () => {
|
||||
"name": "@proj/{project-name}",
|
||||
- "version": "0.0.0",
|
||||
+ "version": "1.0.0",
|
||||
"scripts": {
|
||||
"exports": {
|
||||
|
||||
|
||||
NX Committing changes with git
|
||||
|
||||
@@ -148,11 +148,11 @@ describe('nx release preserve local dependency protocols', () => {
|
||||
"name": "@proj/{project-name}",
|
||||
- "version": "0.0.0",
|
||||
+ "version": "0.1.0",
|
||||
"scripts": {
|
||||
"exports": {
|
||||
"name": "@proj/{project-name}",
|
||||
- "version": "0.0.0",
|
||||
+ "version": "0.1.0",
|
||||
"scripts": {
|
||||
"exports": {
|
||||
"dependencies": {
|
||||
- "@proj/{project-name}": "workspace:*"
|
||||
+ "@proj/{project-name}": "0.1.0"
|
||||
@@ -193,11 +193,11 @@ describe('nx release preserve local dependency protocols', () => {
|
||||
"name": "@proj/{project-name}",
|
||||
- "version": "0.0.0",
|
||||
+ "version": "0.1.0",
|
||||
"scripts": {
|
||||
"exports": {
|
||||
"name": "@proj/{project-name}",
|
||||
- "version": "0.0.0",
|
||||
+ "version": "0.1.0",
|
||||
"scripts": {
|
||||
"exports": {
|
||||
}
|
||||
+
|
||||
NX Updating PM lock file
|
||||
@@ -220,6 +220,10 @@ describe('nx release preserve local dependency protocols', () => {
|
||||
dependencies: {
|
||||
@proj/{project-name}: workspace:*,
|
||||
},
|
||||
exports: {
|
||||
.: ./index.js,
|
||||
./package.json: ./package.json,
|
||||
},
|
||||
name: @proj/{project-name},
|
||||
scripts: {
|
||||
test: node index.js,
|
||||
@@ -289,6 +293,10 @@ describe('nx release preserve local dependency protocols', () => {
|
||||
dependencies: {
|
||||
@proj/{project-name}: workspace:*,
|
||||
},
|
||||
exports: {
|
||||
.: ./index.js,
|
||||
./package.json: ./package.json,
|
||||
},
|
||||
name: @proj/{project-name},
|
||||
scripts: {
|
||||
test: node index.js,
|
||||
|
||||
@@ -17,7 +17,7 @@ export const schema = {
|
||||
style: {
|
||||
type: 'string',
|
||||
description: 'The style solution to use.',
|
||||
enum: ['none', 'css', 'scss', 'less', 'styl'],
|
||||
enum: ['none', 'css', 'scss', 'less'],
|
||||
},
|
||||
rootProject: {
|
||||
type: 'boolean',
|
||||
|
||||
@@ -1475,6 +1475,13 @@ const pricingRedirects = {
|
||||
'/pricing': '/nx-cloud#plans',
|
||||
};
|
||||
|
||||
// Removed CI tutorials: 07/21/25
|
||||
const ciTutorialRedirects = {
|
||||
'/ci/intro/tutorials/circle': '/ci/recipes/set-up/monorepo-ci-circle-ci',
|
||||
'/ci/intro/tutorials/github-actions':
|
||||
'/ci/recipes/set-up/monorepo-ci-github-actions',
|
||||
};
|
||||
|
||||
/**
|
||||
* Public export API
|
||||
*/
|
||||
@@ -1516,4 +1523,5 @@ module.exports = {
|
||||
nxModuleFederationConceptsRedirects,
|
||||
gettingStartedRedirects,
|
||||
pricingRedirects,
|
||||
ciTutorialRedirects,
|
||||
};
|
||||
|
||||
@@ -12,7 +12,7 @@ export function MetricsCTA() {
|
||||
Ready to get started?
|
||||
</h3>
|
||||
<ButtonLink
|
||||
href="/enterprise/trial"
|
||||
href="/contact/sales"
|
||||
title="Reach out"
|
||||
variant="primary"
|
||||
size="default"
|
||||
|
||||
@@ -79,28 +79,28 @@
|
||||
"@notionhq/client": "^2.2.15",
|
||||
"@nuxt/kit": "^3.10.0",
|
||||
"@nuxt/schema": "^3.10.0",
|
||||
"@nx/angular": "21.3.0-rc.0",
|
||||
"@nx/angular": "21.4.0-beta.0",
|
||||
"@nx/conformance": "3.0.0",
|
||||
"@nx/cypress": "21.3.0-rc.0",
|
||||
"@nx/devkit": "21.3.0-rc.0",
|
||||
"@nx/cypress": "21.4.0-beta.0",
|
||||
"@nx/devkit": "21.4.0-beta.0",
|
||||
"@nx/enterprise-cloud": "3.0.0",
|
||||
"@nx/esbuild": "21.3.0-rc.0",
|
||||
"@nx/eslint": "21.3.0-rc.0",
|
||||
"@nx/eslint-plugin": "21.3.0-rc.0",
|
||||
"@nx/gradle": "21.3.0-rc.0",
|
||||
"@nx/jest": "21.3.0-rc.0",
|
||||
"@nx/js": "21.3.0-rc.0",
|
||||
"@nx/esbuild": "21.4.0-beta.0",
|
||||
"@nx/eslint": "21.4.0-beta.0",
|
||||
"@nx/eslint-plugin": "21.4.0-beta.0",
|
||||
"@nx/gradle": "21.4.0-beta.0",
|
||||
"@nx/jest": "21.4.0-beta.0",
|
||||
"@nx/js": "21.4.0-beta.0",
|
||||
"@nx/key": "3.0.0",
|
||||
"@nx/next": "21.3.0-rc.0",
|
||||
"@nx/playwright": "21.3.0-rc.0",
|
||||
"@nx/next": "21.4.0-beta.0",
|
||||
"@nx/playwright": "21.4.0-beta.0",
|
||||
"@nx/powerpack-license": "3.0.0",
|
||||
"@nx/react": "21.3.0-rc.0",
|
||||
"@nx/rsbuild": "21.3.0-rc.0",
|
||||
"@nx/rspack": "21.3.0-rc.0",
|
||||
"@nx/storybook": "21.3.0-rc.0",
|
||||
"@nx/vite": "21.3.0-rc.0",
|
||||
"@nx/web": "21.3.0-rc.0",
|
||||
"@nx/webpack": "21.3.0-rc.0",
|
||||
"@nx/react": "21.4.0-beta.0",
|
||||
"@nx/rsbuild": "21.4.0-beta.0",
|
||||
"@nx/rspack": "21.4.0-beta.0",
|
||||
"@nx/storybook": "21.4.0-beta.0",
|
||||
"@nx/vite": "21.4.0-beta.0",
|
||||
"@nx/web": "21.4.0-beta.0",
|
||||
"@nx/webpack": "21.4.0-beta.0",
|
||||
"@phenomnomnominal/tsquery": "~5.0.1",
|
||||
"@playwright/test": "^1.36.1",
|
||||
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.7",
|
||||
@@ -268,7 +268,7 @@
|
||||
"ng-packagr": "~20.1.0",
|
||||
"npm-package-arg": "11.0.1",
|
||||
"nuxt": "^3.10.0",
|
||||
"nx": "21.3.0-rc.0",
|
||||
"nx": "21.4.0-beta.0",
|
||||
"nx-mcp": "^0.1.0",
|
||||
"octokit": "^2.0.14",
|
||||
"open": "^8.4.0",
|
||||
|
||||
@@ -1883,6 +1883,21 @@
|
||||
"alwaysAddToPackageJson": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"21.3.5-jest": {
|
||||
"version": "21.3.5-beta.0",
|
||||
"requires": {
|
||||
"@angular/compiler-cli": ">=18.0.0 <21.0.0",
|
||||
"@angular/core": ">=18.0.0 <21.0.0",
|
||||
"@angular/platform-browser-dynamic": ">=18.0.0 <21.0.0",
|
||||
"jest": "^30.0.0"
|
||||
},
|
||||
"packages": {
|
||||
"jest-preset-angular": {
|
||||
"version": "~15.0.0",
|
||||
"alwaysAddToPackageJson": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ export const autoprefixerVersion = '^10.4.0';
|
||||
export const tsNodeVersion = '10.9.1';
|
||||
export const lessVersion = '^4.3.0';
|
||||
|
||||
export const jestPresetAngularVersion = '~14.6.0';
|
||||
export const jestPresetAngularVersion = '~15.0.0';
|
||||
export const typesNodeVersion = '18.16.9';
|
||||
export const jasmineMarblesVersion = '^0.9.2';
|
||||
|
||||
|
||||
@@ -238,7 +238,7 @@ export async function pushToGitHub(
|
||||
const repoUrl = repoResult.stdout.trim();
|
||||
|
||||
output.success({
|
||||
title: `Successfully created and pushed to GitHub repository: ${repoUrl}`,
|
||||
title: `Successfully pushed to GitHub repository: ${repoUrl}`,
|
||||
});
|
||||
return VcsPushStatus.PushedToVcs;
|
||||
} catch (e) {
|
||||
|
||||
@@ -30,7 +30,7 @@ const messageOptions: Record<string, MessageData[]> = {
|
||||
{ value: 'skip', name: '\nDo it later' },
|
||||
],
|
||||
footer:
|
||||
'\nRemote caching, task distribution and test splitting are provided by Nx Cloud. Read more at https://nx.dev/ci',
|
||||
'\nSelf-healing CI, remote caching, and task distribution are provided by Nx Cloud: https://nx.dev/nx-cloud',
|
||||
fallback: { value: 'skip', key: 'setupNxCloud' },
|
||||
},
|
||||
],
|
||||
|
||||
@@ -183,15 +183,15 @@ Please see https://nx.dev/recipes/tips-n-tricks/eslint for full guidance on how
|
||||
);
|
||||
}
|
||||
|
||||
// output fixes to disk, if applicable based on the options
|
||||
await ESLint.outputFixes(lintResults);
|
||||
|
||||
// if quiet, only show errors
|
||||
if (normalizedOptions.quiet) {
|
||||
console.debug('Quiet mode enabled - filtering out warnings\n');
|
||||
lintResults = ESLint.getErrorResults(lintResults);
|
||||
}
|
||||
|
||||
// output fixes to disk, if applicable based on the options
|
||||
await ESLint.outputFixes(lintResults);
|
||||
|
||||
const formatter = await eslint.loadFormatter(normalizedOptions.format);
|
||||
|
||||
const formattedResults = await formatter.format(lintResults);
|
||||
|
||||
@@ -22,7 +22,9 @@ export async function resolveAndInstantiateESLint(
|
||||
// ruleFilter exist only in eslint 9+, remove this type when eslint 8 support dropped
|
||||
const eslintOptions: ESLint.Options & { ruleFilter?: Function } = {
|
||||
overrideConfigFile: eslintConfigPath,
|
||||
fix: !!options.fix,
|
||||
fix:
|
||||
!!options.fix &&
|
||||
(options.quiet ? (message) => message.severity === 2 : true),
|
||||
cache: !!options.cache,
|
||||
cacheLocation: options.cacheLocation || undefined,
|
||||
cacheStrategy: options.cacheStrategy || undefined,
|
||||
|
||||
@@ -214,7 +214,7 @@ function getPnpmResolver(
|
||||
mainFields: string[] = []
|
||||
) {
|
||||
if (!resolver) {
|
||||
const fileSystem = new CachedInputFileSystem(fs, 4000);
|
||||
const fileSystem = new CachedInputFileSystem(fs as any, 4000);
|
||||
resolver = ResolverFactory.createResolver({
|
||||
fileSystem,
|
||||
extensions: extensions.map((extension) => '.' + extension),
|
||||
|
||||
@@ -29,9 +29,10 @@ jobs:
|
||||
- nx/set-shas:
|
||||
main-branch-name: 'main'
|
||||
|
||||
# Change from check to check-ci if you turn on the atomizer. Learn more: https://nx.dev/nx-api/gradle#splitting-e2e-tests.
|
||||
# # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected.
|
||||
# # Change from build to build-ci if you turn on the atomizer. Learn more: https://nx.dev/nx-api/gradle#splitting-e2e-tests.
|
||||
- run:
|
||||
command: ./nx affected --base=$NX_BASE --head=$NX_HEAD -t assemble check
|
||||
command: ./nx affected --base=$NX_BASE --head=$NX_HEAD -t build
|
||||
# Nx Cloud recommends fixes for failures to help you get CI green faster. Learn more: https://nx.dev/ci/features/self-healing-ci
|
||||
- run:
|
||||
command: ./nx fix-ci
|
||||
@@ -85,12 +86,13 @@ jobs:
|
||||
architecture: x64
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
|
||||
- uses: nrwl/nx-set-shas@v4
|
||||
|
||||
# Change from check to check-ci if you turn on the atomizer. Learn more: https://nx.dev/nx-api/gradle#splitting-tests
|
||||
- run: ./nx affected -t assemble check
|
||||
# # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected.
|
||||
# # Change from build to build-ci if you turn on the atomizer. Learn more: https://nx.dev/nx-api/gradle#splitting-tests
|
||||
- run: ./nx affected -t build
|
||||
# Nx Cloud recommends fixes for failures to help you get CI green faster. Learn more: https://nx.dev/ci/features/self-healing-ci
|
||||
- run: ./nx fix-ci
|
||||
if: always()
|
||||
@@ -126,9 +128,10 @@ jobs:
|
||||
- nx/set-shas:
|
||||
main-branch-name: 'main'
|
||||
|
||||
# Change from check to check-ci if you turn on the atomizer. Learn more: https://nx.dev/nx-api/gradle#splitting-e2e-tests.
|
||||
# # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected.
|
||||
# # Change from build to build-ci if you turn on the atomizer. Learn more: https://nx.dev/nx-api/gradle#splitting-e2e-tests.
|
||||
- run:
|
||||
command: ./nx affected --base=$NX_BASE --head=$NX_HEAD -t assemble check
|
||||
command: ./nx affected --base=$NX_BASE --head=$NX_HEAD -t build
|
||||
# Nx Cloud recommends fixes for failures to help you get CI green faster. Learn more: https://nx.dev/ci/features/self-healing-ci
|
||||
- run:
|
||||
command: ./nx fix-ci
|
||||
@@ -182,12 +185,13 @@ jobs:
|
||||
architecture: x64
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
|
||||
- uses: nrwl/nx-set-shas@v4
|
||||
|
||||
# Change from check to check-ci if you turn on the atomizer. Learn more: https://nx.dev/nx-api/gradle#splitting-tests
|
||||
- run: ./nx affected -t assemble check
|
||||
# # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected.
|
||||
# # Change from build to build-ci if you turn on the atomizer. Learn more: https://nx.dev/nx-api/gradle#splitting-tests
|
||||
- run: ./nx affected -t build
|
||||
# Nx Cloud recommends fixes for failures to help you get CI green faster. Learn more: https://nx.dev/ci/features/self-healing-ci
|
||||
- run: ./nx fix-ci
|
||||
if: always()
|
||||
|
||||
@@ -36,7 +36,7 @@ jobs:
|
||||
architecture: x64
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
|
||||
- uses: nrwl/nx-set-shas@v4
|
||||
<% for (const command of commands) { %><% if (command.comments) { %><% for (const comment of command.comments) { %>
|
||||
|
||||
@@ -15,9 +15,12 @@ function getCiCommands(ci: Schema['ci']): Command[] {
|
||||
return [
|
||||
{
|
||||
comments: [
|
||||
`Change from check to check-ci if you turn on the atomizer. Learn more: https://nx.dev/nx-api/gradle#splitting-e2e-tests.`,
|
||||
`# Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected.`,
|
||||
`# Change from build to build-ci if you turn on the atomizer. Learn more: https://nx.dev/nx-api/gradle#splitting-e2e-tests.`,
|
||||
],
|
||||
command: `./nx affected --base=$NX_BASE --head=$NX_HEAD -t assemble check`,
|
||||
},
|
||||
{
|
||||
command: `./nx affected --base=$NX_BASE --head=$NX_HEAD -t build`,
|
||||
},
|
||||
getNxCloudFixCiCommand(),
|
||||
];
|
||||
@@ -26,9 +29,10 @@ function getCiCommands(ci: Schema['ci']): Command[] {
|
||||
return [
|
||||
{
|
||||
comments: [
|
||||
`Change from check to check-ci if you turn on the atomizer. Learn more: https://nx.dev/nx-api/gradle#splitting-tests`,
|
||||
`# Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected.`,
|
||||
`# Change from build to build-ci if you turn on the atomizer. Learn more: https://nx.dev/nx-api/gradle#splitting-tests`,
|
||||
],
|
||||
command: `./nx affected -t assemble check`,
|
||||
command: `./nx affected -t build`,
|
||||
},
|
||||
getNxCloudFixCiCommand(),
|
||||
];
|
||||
|
||||
@@ -114,6 +114,28 @@
|
||||
"alwaysAddToPackageJson": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"21.3.3": {
|
||||
"version": "21.3.3-beta.0",
|
||||
"packages": {
|
||||
"ts-jest": {
|
||||
"version": "~29.4.0",
|
||||
"alwaysAddToPackageJson": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"21.3.3-jest-util": {
|
||||
"version": "21.3.3-beta.3",
|
||||
"requires": {
|
||||
"jest": ">=30.0.0 <31.0.0",
|
||||
"ts-jest": ">=29.4.0"
|
||||
},
|
||||
"packages": {
|
||||
"jest-util": {
|
||||
"version": "~30.0.0",
|
||||
"addToPackageJson": "devDependencies"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,8 @@ export function ensureDependencies(
|
||||
// jest will throw an error if it's not installed
|
||||
// even if not using it in overriding transformers
|
||||
'ts-jest': tsJestVersion,
|
||||
// peer dependency of ts-jest
|
||||
'jest-util': jestVersion,
|
||||
};
|
||||
|
||||
if (options.testEnvironment !== 'none') {
|
||||
|
||||