Simple Node.js Pipeline

A sequential workflow for Node.js that runs linting and tests.

A sequential workflow that installs dependencies runs linting and tests. Scripts for each of the commands must be present in the projects package.json.

package.json

{
  "name": "example-package",
  "version": "0.0.1",
  "scripts": {
    "test": "jest",
    "lint": "eslint ."
  }
}

.sail.yml

tasks:
  build:
    image: node:carbon
    command:
      - yarn
    args:
      - install
  lint:
    image: node:carbon
    command:
      - yarn
    args:
      - lint
  test:
    image: node:carbon
    command:
      - yarn
    args:
      - test


Full Example Repository:
https://github.com/sailci/quickstart-nodejs-simple