# This buildspec will run Cypress tests.
# It does NOT build Docker images and it does NOT run unit tests.

version: 0.2

env:
  shell: bash

phases:

  install:
    on-failure: ABORT
    runtime-versions:
      java: corretto11
      nodejs: 14
    commands:
      - set -o pipefail
      - source ci/common/extra-env.sh
      - mkdir -pv ci/logs
      - source ci/2-scripts/1-install.sh
    finally:
      - source ci/common/upload-logs.sh

  build:
    on-failure: ABORT
    commands:
      - set -o pipefail
      - source ci/common/extra-env.sh
      - mkdir -pv ci/logs
      - source ci/2-scripts/3-build.sh
    finally:
      - source ci/common/upload-logs.sh

cache:
  paths:
    - '/root/.cache/Cypress/**/*'  # Cypress binary.
