version: 0.2
env:
  variables:
    PRX_NULL: "null"
phases:
  install:
    runtime-versions:
      python: 3.8
      nodejs: 12
    commands:
      - 'npm install'
      - 'pip3 install -r requirements.txt'
  build:
    commands:
      - 'cd $(ls -d */|head -n 1)'
      - 'find . -name "*.yml" -type f ! -path "./node_modules/*" -mindepth 2 -print0 | xargs -0 -n1 cfn-lint --ignore-checks W --template'
      - 'python3.9 -m black --check ./'
      - 'python3.9 -m flake8'
      - 'npm run tsc'
      - 'npm run eslint -- "**/*.js"'
  post_build:
      commands:
        - 'curl -sO "https://raw.githubusercontent.com/PRX/Infrastructure/master/ci/utility/post_build.sh" && chmod +x post_build.sh && bash ./post_build.sh'

version: 0.2
env:
  variables:
    PRX_NULL: "null"
phases:
  install:
    runtime-versions:
      python: 3.8
      nodejs: 12
    commands:
      - 'cd $(ls -d */|head -n 1)'
      - 'npm install'
      - 'pip3 install -r requirements.txt'
  build:
    commands:
      - 'find . -name "*.yml" -type f ! -path "./node_modules/*" -mindepth 2 -print0 | xargs -0 -n1 cfn-lint --ignore-checks W --template'
      - 'python3.9 -m black --check ./'
      - 'python3.9 -m flake8'
      - 'npm run tsc'
      - 'npm run eslint -- "**/*.js"'
  post_build:
      commands:
        - 'curl -sO "https://raw.githubusercontent.com/PRX/Infrastructure/master/ci/utility/post_build.sh" && chmod +x post_build.sh && bash ./post_build.sh'

Change directories before install commands
Change directories before install commands
