image: node:lts clone: depth: full definitions: caches: sonar: ~/.sonar services: docker: memory: 4096 steps: - step: &test-sonarcloud name: Test and analyze on SonarQube Cloud size: 2x caches: - node - sonar script: - npm ci - npm run coverage - pipe: sonarsource/sonarcloud-scan:4.0.0 pipelines: branches: sonar-test: - step: *test-sonarcloud