Anything you do to CircleCI twice should be automated. This walks the path from a manual install to a repeatable, pipeline-driven setup.
1. Install it reproducibly
# Validate config locally with the CircleCI CLI
curl -fLSs https://circle.ci/cli | bash
circleci config validate2. Describe the desired state
Workflow with caching and an orb.
version: 2.1
orbs: { node: circleci/node@5 }
jobs:
test:
docker: [{ image: cimg/node:20.11 }]
steps:
- checkout
- node/install-packages
- run: npm test
workflows:
build: { jobs: [test] }3. Run it from CI
Fan out slow test suites with parallelism.
test:
parallelism: 4
steps:
- run: circleci tests glob 'test/**/*.spec.js' | circleci tests split | xargs npm testWant senior help putting CircleCI to work - or a team bootcamp on it? CodeWizard runs Israel's largest DevOps community and embeds named senior engineers with a transparent hours log. Book a free consult or explore the Academy.