CI for Node.js
Build, lint, and test a Node.js web application using npm, ESLint, Jest, and Cypress.
Use template →- Languages
- JavaScript
- Use cases
- Continuous integration, Web application
- Platforms
- Docker
CI for Node.js
Build, lint, and test a Node.js web application using npm, ESLint, Jest, and Cypress.
Use template →CI for Node.js
This template gives you a continuous integration (CI) pipeline that builds, lints, and end-to-end tests a Node.js application.
At a glance:
- For Node.js apps
- Uses npm
- Requires Docker
- Lints code with ESLint
- Runs Jest unit tests
- Runs Cypress integration tests
How it works
This template:
- Installs Node.js dependencies using npm, caching the result.
- Performs static analysis on the codebase with ESLint.
- Runs Jest unit tests.
- Starts the web app using
npm start
on port8000
, then runs any Cypress tests using their official Docker image. It useswait-on
to verify the app is ready for testing.
All steps run in serial, with each depending on the previous step to complete before starting. The runtime environment uses a Docker image with the latest version of Node.
Next steps
After you select Use template, you’ll:
- Connect the Git repository for your Node.js app.
- Check the commands match your scripts in
package.json
. - Configure the compute—run locally, on-premises, or in the cloud.
- Run the pipeline.
You can then play around with the pipeline settings. For example, run the pipeline locally while you iterate on the definition or set a schedule to trigger a nightly build.
If you need help, please check our documentation, raise an issue, or reach out to support.