Circleci config validate says config valid, but it isn't

workflow

#1

Given the following config:

version: 2
jobs:
  build:
    docker:
      - image: docker
    working_directory: /usr/src/app
    steps:
      - checkout
      - setup_remote_docker
      - run: echo "build"
  deploy:
    docker:
      - image: docker
    working_directory: /usr/src/app
    steps:
      - checkout
      - setup_remote_docker
      - run: echo "deploy"
workflows:
  version: 2
  build-test-and-deploy:
    jobs:
      - build
      - deploy:
        requires:
          - build

circleci config validate it claims this is valid, but if actually trying to run it on circleci you get this error in the workflow ui: {:workflows {:build-test-and-deploy {:jobs [nil {:deploy (not (map? nil)), :requires (not (map? a-clojure.lang.LazySeq))}]}}} (which is really hard to read by the way).

The local tool should detect this.

For the record, the correct config is:

version: 2
jobs:
  build:
    docker:
      - image: docker
    working_directory: /usr/src/app
    steps:
      - checkout
      - setup_remote_docker
      - run: echo "build"
  deploy:
    docker:
      - image: docker
    working_directory: /usr/src/app
    steps:
      - checkout
      - setup_remote_docker
      - run: echo "deploy"
workflows:
  version: 2
  build-test-and-deploy:
    jobs:
      - build
      - deploy:
          requires:
            - build

CircleCI Local CLI doesn't validate config file's workflows
#2