image: node:16-slim

pipelines:
    default:
        #    - step:
        #        name: "Clear stale cache"
        #        script:
        #          - pipe: atlassian/bitbucket-clear-cache:3.1.1
        #        variables:
        #          BITBUCKET_USERNAME: $BITBUCKET_USER_NAME
        #          BITBUCKET_APP_PASSWORD: $BITBUCKET_APP_PASSWORD
        #          CACHES: [ "node", "vxmessenger" ]
        #        condition:
        #          changesets:
        #            includePaths:
        #              - yarn.lock
        # Bootstrap only once per run
        - step:
              name: "Boostrap"
              caches:
                  - node
              script:
                  - yarn install --frozen-lock-file
        - step:
              name: "Lint"
              caches:
                  - node
              script:
                  - yarn run lint
        - step:
              name: "Build"
              caches:
                  - node
              script:
                  - yarn run build
