Skip to content

karadnik-flutterint/nx-shops

 
 

Repository files navigation

NxCloud CI example repo

This repo is based on the Nx Examples repo but setup in a way to illustrate some of the benefits of using Nx and NxCloud together to setup CI.

The e2e targets are setup to serve the app statically from dist:

this is how the apps are served statically:

    "serve-static": {
      "executor": "@nrwl/web:file-server",
      "options": {
        "buildTarget": "cart:build"
      }
    },

This then results in this project graph:

The DTE solution can then be explained as such: https://youtu.be/NZF0ZJpgaJM?si=gLpTnTdygB1gx7wI&t=516

Here is an example DTE config that is applicable to most CI providers.

In the above yaml, if you remove the line that activate DTE:

# - run: npx nx-cloud start-ci-run --stop-agents-after="e2e"

it will go from finishing in 3 minutes, to finishing in 9 minutes. That is because we can now parallelise the tasks across machines. So it also illustrates the CI time savings we get from DTE.

You can also use the non-DTE CI config:

  • without NxCloud
  • with NxCloud

and you should notice a difference of 8-9 minutes down to 1-2 minutes because of caching. So it can also be used to explain the caching benefits.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 90.0%
  • JavaScript 3.7%
  • SCSS 3.2%
  • HTML 2.5%
  • CSS 0.6%