chore(core): add instructions to use e2e-ci with dte (#28621)

Use e2e in ci-workflow generator with instructions to use e2e-ci if Nx
Agents are turned on
This commit is contained in:
Isaac Mann 2024-10-25 15:08:01 -04:00 committed by GitHub
parent 013aaee85f
commit 3da438d270
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
14 changed files with 85 additions and 67 deletions

View File

@ -230,9 +230,9 @@ The Nx Agents feature
- collects the results and logs of all the tasks and presents them in a single view - 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 - automatically shuts down agents when they are no longer needed
To enable Nx Agents, make sure the following line is uncommented in the `.circleci/config.yml` file. 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"] %} ```yml {% fileName=".circleci/config.yml" highlightLines=["21","29"] %}
version: 2.1 version: 2.1
orbs: orbs:

View File

@ -195,7 +195,7 @@ The Nx Agents feature
- collects the results and logs of all the tasks and presents them in a single view - 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 - automatically shuts down agents when they are no longer needed
To enable Nx Agents, make sure the following line is uncommented in the `.github/workflows/ci.yml` file. 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] %} ```yml {% fileName=".github/workflows/ci.yml" highlightLines=[19] %}
name: CI name: CI

View File

@ -1275,7 +1275,7 @@ Once you click the link, follow the steps provided and make sure Nx Cloud is ena
### Configure Your CI Workflow {% highlightColor="green" %} ### Configure Your CI Workflow {% highlightColor="green" %}
When you chose GitHub Actions as your CI provider at the beginning of the tutorial, `create-nx-workspace` created 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. If you would like to also distribute tasks across multiple machines to ensure fast and reliable CI runs, uncomment the `nx-cloud start-ci-run` line. When you chose GitHub Actions as your CI provider at the beginning of the tutorial, `create-nx-workspace` created 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. If you would like to also distribute tasks across multiple machines to ensure fast and reliable CI runs, uncomment the `nx-cloud start-ci-run` line and have the `nx affected` line run the `e2e-ci` task instead of `e2e`.
If you need to generate a new workflow file for GitHub Actions or other providers, you can do so with this command: If you need to generate a new workflow file for GitHub Actions or other providers, you can do so with this command:
@ -1285,7 +1285,7 @@ npx nx generate ci-workflow
The key lines in the CI pipeline are: The key lines in the CI pipeline are:
```yml {% fileName=".github/workflows/ci.yml" highlightLines=["10-14", "21-22"] %} ```yml {% fileName=".github/workflows/ci.yml" highlightLines=["10-14", "21-23"] %}
name: CI name: CI
# ... # ...
jobs: jobs:
@ -1299,7 +1299,7 @@ jobs:
# Run this command as early as possible, before dependencies are installed # 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 # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun
# Uncomment this line to enable task distribution # Uncomment this line to enable task distribution
# - run: npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" # - run: npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="e2e-ci"
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version: 20 node-version: 20
@ -1307,7 +1307,8 @@ jobs:
- run: npm ci --legacy-peer-deps - run: npm ci --legacy-peer-deps
- uses: nrwl/nx-set-shas@v4 - uses: nrwl/nx-set-shas@v4
# Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
- run: npx nx affected -t lint test build # When you enable task distribution, run the e2e-ci task instead of e2e
- run: npx nx affected -t lint test build e2e
``` ```
### Open a Pull Request {% highlightColor="green" %} ### Open a Pull Request {% highlightColor="green" %}

View File

@ -1075,7 +1075,7 @@ Once you click the link, follow the steps provided and make sure Nx Cloud is ena
### Configure Your CI Workflow {% highlightColor="green" %} ### Configure Your CI Workflow {% highlightColor="green" %}
When you chose GitHub Actions as your CI provider at the beginning of the tutorial, `create-nx-workspace` created 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. If you would like to also distribute tasks across multiple machines to ensure fast and reliable CI runs, uncomment the `nx-cloud start-ci-run` line. When you chose GitHub Actions as your CI provider at the beginning of the tutorial, `create-nx-workspace` created 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. If you would like to also distribute tasks across multiple machines to ensure fast and reliable CI runs, uncomment the `nx-cloud start-ci-run` line and have the `nx affected` line run the `e2e-ci` task instead of `e2e`.
If you need to generate a new workflow file for GitHub Actions or other providers, you can do so with this command: If you need to generate a new workflow file for GitHub Actions or other providers, you can do so with this command:
@ -1085,7 +1085,7 @@ npx nx generate ci-workflow
The key lines in the CI pipeline are: The key lines in the CI pipeline are:
```yml {% fileName=".github/workflows/ci.yml" highlightLines=["10-14", "21-22"] %} ```yml {% fileName=".github/workflows/ci.yml" highlightLines=["10-14", "21-23"] %}
name: CI name: CI
# ... # ...
jobs: jobs:
@ -1099,7 +1099,7 @@ jobs:
# Run this command as early as possible, before dependencies are installed # 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 # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun
# Uncomment this line to enable task distribution # Uncomment this line to enable task distribution
# - run: npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" # - run: npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="e2e-ci"
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version: 20 node-version: 20
@ -1107,7 +1107,8 @@ jobs:
- run: npm ci --legacy-peer-deps - run: npm ci --legacy-peer-deps
- uses: nrwl/nx-set-shas@v4 - uses: nrwl/nx-set-shas@v4
# Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
- run: npx nx affected -t lint test build # When you enable task distribution, run the e2e-ci task instead of e2e
- run: npx nx affected -t lint test build e2e
``` ```
### Open a Pull Request {% highlightColor="green" %} ### Open a Pull Request {% highlightColor="green" %}

View File

@ -440,11 +440,11 @@ Use the following command to generate a CI workflow file.
npx nx generate ci-workflow --ci=github npx 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. If you would like to also distribute tasks across multiple machines to ensure fast and reliable CI runs, uncomment the `nx-cloud start-ci-run` line. 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. If you would like to also distribute tasks across multiple machines to ensure fast and reliable CI runs, uncomment the `nx-cloud start-ci-run` line and have the `nx affected` line run the `e2e-ci` task instead of `e2e`.
The key lines in the CI pipeline are: The key lines in the CI pipeline are:
```yml {% fileName=".github/workflows/ci.yml" highlightLines=["10-14", "21-22"] %} ```yml {% fileName=".github/workflows/ci.yml" highlightLines=["10-14", "21-23"] %}
name: CI name: CI
# ... # ...
jobs: jobs:
@ -458,7 +458,7 @@ jobs:
# Run this command as early as possible, before dependencies are installed # 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 # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun
# Uncomment this line to enable task distribution # Uncomment this line to enable task distribution
# - run: npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" # - run: npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="e2e-ci"
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version: 20 node-version: 20
@ -466,7 +466,8 @@ jobs:
- run: npm ci --legacy-peer-deps - run: npm ci --legacy-peer-deps
- uses: nrwl/nx-set-shas@v4 - uses: nrwl/nx-set-shas@v4
# Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
- run: npx nx affected -t lint test build # When you enable task distribution, run the e2e-ci task instead of e2e
- run: npx nx affected -t lint test build e2e
``` ```
### Open a Pull Request {% highlightColor="green" %} ### Open a Pull Request {% highlightColor="green" %}

View File

@ -1078,7 +1078,7 @@ Once you click the link, follow the steps provided and make sure Nx Cloud is ena
### Configure Your CI Workflow {% highlightColor="green" %} ### Configure Your CI Workflow {% highlightColor="green" %}
When you chose GitHub Actions as your CI provider at the beginning of the tutorial, `create-nx-workspace` created 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. If you would like to also distribute tasks across multiple machines to ensure fast and reliable CI runs, uncomment the `nx-cloud start-ci-run` line. When you chose GitHub Actions as your CI provider at the beginning of the tutorial, `create-nx-workspace` created 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. If you would like to also distribute tasks across multiple machines to ensure fast and reliable CI runs, uncomment the `nx-cloud start-ci-run` line and have the `nx affected` line run the `e2e-ci` task instead of `e2e`.
If you need to generate a new workflow file for GitHub Actions or other providers, you can do so with this command: If you need to generate a new workflow file for GitHub Actions or other providers, you can do so with this command:
@ -1088,7 +1088,7 @@ npx nx generate ci-workflow
The key lines in the CI pipeline are: The key lines in the CI pipeline are:
```yml {% fileName=".github/workflows/ci.yml" highlightLines=["10-14", "21-22"] %} ```yml {% fileName=".github/workflows/ci.yml" highlightLines=["10-14", "21-23"] %}
name: CI name: CI
# ... # ...
jobs: jobs:
@ -1102,7 +1102,7 @@ jobs:
# Run this command as early as possible, before dependencies are installed # 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 # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun
# Uncomment this line to enable task distribution # Uncomment this line to enable task distribution
# - run: npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" # - run: npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="e2e-ci"
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version: 20 node-version: 20
@ -1110,7 +1110,8 @@ jobs:
- run: npm ci --legacy-peer-deps - run: npm ci --legacy-peer-deps
- uses: nrwl/nx-set-shas@v4 - uses: nrwl/nx-set-shas@v4
# Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
- run: npx nx affected -t lint test build # When you enable task distribution, run the e2e-ci task instead of e2e
- run: npx nx affected -t lint test build e2e
``` ```
### Open a Pull Request {% highlightColor="green" %} ### Open a Pull Request {% highlightColor="green" %}

View File

@ -1033,11 +1033,11 @@ Use the following command to generate a CI workflow file.
npx nx generate ci-workflow --ci=github npx 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. If you would like to also distribute tasks across multiple machines to ensure fast and reliable CI runs, uncomment the `nx-cloud start-ci-run` line. 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. If you would like to also distribute tasks across multiple machines to ensure fast and reliable CI runs, uncomment the `nx-cloud start-ci-run` line and have the `nx affected` line run the `e2e-ci` task instead of `e2e`.
The key lines in the CI pipeline are: The key lines in the CI pipeline are:
```yml {% fileName=".github/workflows/ci.yml" highlightLines=["10-14", "21-22"] %} ```yml {% fileName=".github/workflows/ci.yml" highlightLines=["10-14", "21-23"] %}
name: CI name: CI
# ... # ...
jobs: jobs:
@ -1050,8 +1050,8 @@ jobs:
# This enables task distribution via Nx Cloud # This enables task distribution via Nx Cloud
# Run this command as early as possible, before dependencies are installed # 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 # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun
# Connect your workspace by running "nx connect" and uncomment this # Uncomment this line to enable task distribution
- run: npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" # - run: npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="e2e-ci"
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version: 20 node-version: 20
@ -1059,7 +1059,8 @@ jobs:
- run: npm ci --legacy-peer-deps - run: npm ci --legacy-peer-deps
- uses: nrwl/nx-set-shas@v4 - uses: nrwl/nx-set-shas@v4
# Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
- run: npx nx affected -t lint test build # When you enable task distribution, run the e2e-ci task instead of e2e
- run: npx nx affected -t lint test build e2e
``` ```
### Open a Pull Request {% highlightColor="green" %} ### Open a Pull Request {% highlightColor="green" %}

View File

@ -1081,11 +1081,11 @@ Use the following command to generate a CI workflow file.
npx nx generate ci-workflow --ci=github npx 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. If you would like to also distribute tasks across multiple machines to ensure fast and reliable CI runs, uncomment the `nx-cloud start-ci-run` line. 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. If you would like to also distribute tasks across multiple machines to ensure fast and reliable CI runs, uncomment the `nx-cloud start-ci-run` line and have the `nx affected` line run the `e2e-ci` task instead of `e2e`.
The key lines in the CI pipeline are: The key lines in the CI pipeline are:
```yml {% fileName=".github/workflows/ci.yml" highlightLines=["10-14", "21-22"] %} ```yml {% fileName=".github/workflows/ci.yml" highlightLines=["10-14", "21-23"] %}
name: CI name: CI
# ... # ...
jobs: jobs:
@ -1099,7 +1099,7 @@ jobs:
# Run this command as early as possible, before dependencies are installed # 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 # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun
# Uncomment this line to enable task distribution # Uncomment this line to enable task distribution
# - run: npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" # - run: npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="e2e-ci"
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version: 20 node-version: 20
@ -1107,7 +1107,8 @@ jobs:
- run: npm ci --legacy-peer-deps - run: npm ci --legacy-peer-deps
- uses: nrwl/nx-set-shas@v4 - uses: nrwl/nx-set-shas@v4
# Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
- run: npx nx affected -t lint test build # When you enable task distribution, run the e2e-ci task instead of e2e
- run: npx nx affected -t lint test build e2e
``` ```
### Open a Pull Request {% highlightColor="green" %} ### Open a Pull Request {% highlightColor="green" %}

View File

@ -58,7 +58,8 @@ jobs:
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - script: npx nx-cloud record -- echo Hello World # - script: npx 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 # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
- script: npx nx affected --base=$(BASE_SHA) --head=$(HEAD_SHA) lint test build e2e-ci # When you enable task distribution, run the e2e-ci task instead of e2e
- script: npx nx affected --base=$(BASE_SHA) --head=$(HEAD_SHA) lint test build e2e
" "
`; `;
@ -88,8 +89,8 @@ pipelines:
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# npx nx-cloud record -- echo Hello World # npx 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 # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
- npx nx affected --base=origin/main -t lint test build # When you enable task distribution, run the e2e-ci task instead of e2e
- npx nx affected --base=origin/main --parallel 1 -t e2e-ci - npx nx affected --base=origin/main -t lint test build e2e
branches: branches:
main: main:
@ -138,7 +139,8 @@ jobs:
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - run: npx nx-cloud record -- echo Hello World # - run: npx 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 # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
- run: npx nx affected --base=$NX_BASE --head=$NX_HEAD -t lint test build e2e-ci # When you enable task distribution, run the e2e-ci task instead of e2e
- run: npx nx affected -t lint test build e2e
workflows: workflows:
version: 2 version: 2
@ -189,7 +191,8 @@ jobs:
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - run: npx nx-cloud record -- echo Hello World # - run: npx 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 # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
- run: npx nx affected -t lint test build e2e-ci # When you enable task distribution, run the e2e-ci task instead of e2e
- run: npx nx affected -t lint test build e2e
" "
`; `;
@ -233,7 +236,8 @@ jobs:
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - run: npx nx-cloud record -- echo Hello World # - run: npx 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 # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
- run: npx nx affected -t lint test build e2e-ci # When you enable task distribution, run the e2e-ci task instead of e2e
- run: npx nx affected -t lint test build e2e
" "
`; `;
@ -382,7 +386,7 @@ jobs:
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - run: bun nx-cloud record -- echo Hello World # - run: bun 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 # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
- run: bun nx affected --base=$NX_BASE --head=$NX_HEAD -t lint test build - run: bun nx affected -t lint test build
workflows: workflows:
version: 2 version: 2
@ -502,7 +506,7 @@ CI:
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - bun nx-cloud record -- echo Hello World # - bun 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 # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
- bun nx affected --base=$NX_BASE --head=$NX_HEAD -t lint test build - bun nx affected -t lint test build
" "
`; `;
@ -640,7 +644,7 @@ jobs:
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - run: npx nx-cloud record -- echo Hello World # - run: npx 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 # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
- run: npx nx affected --base=$NX_BASE --head=$NX_HEAD -t lint test build - run: npx nx affected -t lint test build
workflows: workflows:
version: 2 version: 2
@ -762,7 +766,7 @@ CI:
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - npx nx-cloud record -- echo Hello World # - npx 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 # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
- npx nx affected --base=$NX_BASE --head=$NX_HEAD -t lint test build - npx nx affected -t lint test build
" "
`; `;
@ -911,7 +915,7 @@ jobs:
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud # 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-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 # 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 --base=$NX_BASE --head=$NX_HEAD -t lint test build - run: pnpm exec nx affected -t lint test build
workflows: workflows:
version: 2 version: 2
@ -1043,7 +1047,7 @@ CI:
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - pnpm exec nx-cloud record -- echo Hello World # - 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 # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
- pnpm exec nx affected --base=$NX_BASE --head=$NX_HEAD -t lint test build - pnpm exec nx affected -t lint test build
" "
`; `;
@ -1181,7 +1185,7 @@ jobs:
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - run: yarn nx-cloud record -- echo Hello World # - run: yarn 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 # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
- run: yarn nx affected --base=$NX_BASE --head=$NX_HEAD -t lint test build - run: yarn nx affected -t lint test build
workflows: workflows:
version: 2 version: 2
@ -1303,7 +1307,7 @@ CI:
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - yarn nx-cloud record -- echo Hello World # - yarn 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 # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
- yarn nx affected --base=$NX_BASE --head=$NX_HEAD -t lint test build - yarn nx affected -t lint test build
" "
`; `;
@ -1365,7 +1369,8 @@ jobs:
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - script: npx nx-cloud record -- echo Hello World # - script: npx 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 # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
- script: npx nx affected --base=$(BASE_SHA) --head=$(HEAD_SHA) lint test build e2e-ci # When you enable task distribution, run the e2e-ci task instead of e2e
- script: npx nx affected --base=$(BASE_SHA) --head=$(HEAD_SHA) lint test build e2e
" "
`; `;
@ -1395,8 +1400,8 @@ pipelines:
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# npx nx-cloud record -- echo Hello World # npx 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 # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
- npx nx affected --base=origin/main -t lint test build # When you enable task distribution, run the e2e-ci task instead of e2e
- npx nx affected --base=origin/main --parallel 1 -t e2e-ci - npx nx affected --base=origin/main -t lint test build e2e
branches: branches:
main: main:
@ -1446,7 +1451,8 @@ jobs:
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - run: npx nx-cloud record -- echo Hello World # - run: npx 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 # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
- run: npx nx affected --base=$NX_BASE --head=$NX_HEAD -t lint test build e2e-ci # When you enable task distribution, run the e2e-ci task instead of e2e
- run: npx nx affected -t lint test build e2e
workflows: workflows:
version: 2 version: 2
@ -1497,7 +1503,8 @@ jobs:
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - run: npx nx-cloud record -- echo Hello World # - run: npx 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 # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
- run: npx nx affected -t lint test build e2e-ci # When you enable task distribution, run the e2e-ci task instead of e2e
- run: npx nx affected -t lint test build e2e
" "
`; `;
@ -1541,7 +1548,8 @@ jobs:
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - run: npx nx-cloud record -- echo Hello World # - run: npx 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 # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
- run: npx nx affected -t lint test build e2e-ci # When you enable task distribution, run the e2e-ci task instead of e2e
- run: npx nx affected -t lint test build e2e
" "
`; `;
@ -1691,7 +1699,7 @@ jobs:
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - run: bun nx-cloud record -- echo Hello World # - run: bun 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 # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
- run: bun nx affected --base=$NX_BASE --head=$NX_HEAD -t lint test build - run: bun nx affected -t lint test build
workflows: workflows:
version: 2 version: 2
@ -1811,7 +1819,7 @@ CI:
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - bun nx-cloud record -- echo Hello World # - bun 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 # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
- bun nx affected --base=$NX_BASE --head=$NX_HEAD -t lint test build - bun nx affected -t lint test build
" "
`; `;
@ -1950,7 +1958,7 @@ jobs:
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - run: npx nx-cloud record -- echo Hello World # - run: npx 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 # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
- run: npx nx affected --base=$NX_BASE --head=$NX_HEAD -t lint test build - run: npx nx affected -t lint test build
workflows: workflows:
version: 2 version: 2
@ -2072,7 +2080,7 @@ CI:
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - npx nx-cloud record -- echo Hello World # - npx 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 # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
- npx nx affected --base=$NX_BASE --head=$NX_HEAD -t lint test build - npx nx affected -t lint test build
" "
`; `;
@ -2222,7 +2230,7 @@ jobs:
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud # 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-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 # 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 --base=$NX_BASE --head=$NX_HEAD -t lint test build - run: pnpm exec nx affected -t lint test build
workflows: workflows:
version: 2 version: 2
@ -2354,7 +2362,7 @@ CI:
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - pnpm exec nx-cloud record -- echo Hello World # - 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 # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
- pnpm exec nx affected --base=$NX_BASE --head=$NX_HEAD -t lint test build - pnpm exec nx affected -t lint test build
" "
`; `;
@ -2493,7 +2501,7 @@ jobs:
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - run: yarn nx-cloud record -- echo Hello World # - run: yarn 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 # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
- run: yarn nx affected --base=$NX_BASE --head=$NX_HEAD -t lint test build - run: yarn nx affected -t lint test build
workflows: workflows:
version: 2 version: 2
@ -2615,6 +2623,6 @@ CI:
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - yarn nx-cloud record -- echo Hello World # - yarn 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 # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
- yarn nx affected --base=$NX_BASE --head=$NX_HEAD -t lint test build - yarn nx affected -t lint test build
" "
`; `;

View File

@ -66,5 +66,6 @@ jobs:
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - script: <%= packageManagerPrefix %> nx-cloud record -- echo Hello World # - script: <%= packageManagerPrefix %> 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 # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected<% if(hasE2E){ %>
- script: <%= packageManagerPrefix %> nx affected --base=$(BASE_SHA) --head=$(HEAD_SHA) lint test build<% if(hasE2E){ %> e2e-ci<% } %> # When you enable task distribution, run the e2e-ci task instead of e2e<% } %>
- script: <%= packageManagerPrefix %> nx affected --base=$(BASE_SHA) --head=$(HEAD_SHA) lint test build<% if(hasE2E){ %> e2e<% } %>

View File

@ -31,9 +31,9 @@ pipelines:
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# <%= packageManagerPrefix %> nx-cloud record -- echo Hello World # <%= packageManagerPrefix %> 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 # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected<% if(hasE2E){ %>
- <%= packageManagerPrefix %> nx affected --base=origin/<%= mainBranch %> -t lint test build<% if(hasE2E){ %> # When you enable task distribution, run the e2e-ci task instead of e2e<% } %>
- <%= packageManagerPrefix %> nx affected --base=origin/<%= mainBranch %> --parallel 1 -t e2e-ci<% } %> - <%= packageManagerPrefix %> nx affected --base=origin/<%= mainBranch %> -t lint test build<% if(hasE2E){ %> e2e<% } %>
branches: branches:
main: main:

View File

@ -35,8 +35,9 @@ jobs:
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - run: <%= packageManagerPrefix %> nx-cloud record -- echo Hello World # - run: <%= packageManagerPrefix %> 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 # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected<% if(hasE2E){ %>
- run: <%= packageManagerPrefix %> nx affected --base=$NX_BASE --head=$NX_HEAD -t lint test build<% if(hasE2E){ %> e2e-ci<% } %> # When you enable task distribution, run the e2e-ci task instead of e2e<% } %>
- run: <%= packageManagerPrefix %> nx affected -t lint test build<% if(hasE2E){ %> e2e<% } %>
workflows: workflows:
version: 2 version: 2

View File

@ -48,5 +48,6 @@ jobs:
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - run: <%= packageManagerPrefix %> nx-cloud record -- echo Hello World # - run: <%= packageManagerPrefix %> 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 # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected<% if(hasE2E){ %>
- run: <%= packageManagerPrefix %> nx affected -t lint test build<% if(hasE2E){ %> e2e-ci<% } %> # When you enable task distribution, run the e2e-ci task instead of e2e<% } %>
- run: <%= packageManagerPrefix %> nx affected -t lint test build<% if(hasE2E){ %> e2e<% } %>

View File

@ -29,5 +29,6 @@ variables:
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - <%= packageManagerPrefix %> nx-cloud record -- echo Hello World # - <%= packageManagerPrefix %> 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 # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected<% if(hasE2E){ %>
- <%= packageManagerPrefix %> nx affected --base=$NX_BASE --head=$NX_HEAD -t lint test build<% if(hasE2E){ %> e2e-ci<% } %> # When you enable task distribution, run the e2e-ci task instead of e2e<% } %>
- <%= packageManagerPrefix %> nx affected -t lint test build<% if(hasE2E){ %> e2e<% } %>