--- image: node:18.18.2 definitions: caches: npm: $HOME/.npm steps: - step: &lint name: Check code syntax caches: - npm script: - npm ci - npm run lint - step: &test name: Run tests caches: - npm script: - npm ci - npm run test - step: &build image: node:18-alpine name: build the package for npm distribution caches: - npm script: - NODE_ENV=production npm ci - npm run build pipelines: default: - parallel: - step: *lint - step: *test branches: master: - parallel: fail-fast: true steps: - step: *lint - step: *test - step: *build