default:
  image: node:12

before_script:
  - npm ci

stages:
  - source_check
  - build
  - test

check_format:
  stage: source_check
  script:
    - npx prettier --ignore-path .gitignore --check "**/*.{html,js,json,md}"

lint:
  stage: source_check
  script:
    - npx eslint --ignore-path .gitignore "**/*.js"

backend_build:
  stage: build
  script:
    - npm run build

backend_test:
  stage: test
  script:
    - npm test