stages:
  - install
  - test
  - build
  - deploy

default:
  image: iqbberlin/aspect-test:latest

test-unit:
  stage: test
  before_script:
    - npm ci --cache .npm --prefer-offline
  script:
    - npm run test
  cache:
    key: aspect-npm-packages
    paths:
      - .npm/

#deploy:
#  stage: deploy
#  only:
#    refs:
#      - master
#  before_script:
#    - npm ci --cache .npm --prefer-offline
#  script:
#    - npm run build-editor
#    - npm run build-player
#    - ./scripts/deploy.sh $TESTSTUDIO_USERNAME $TESTSTUDIO_PASSWORD
#  artifacts:
#    paths:
#      - dist/iqb-editor-aspect-nightly.html
#      - dist/iqb-player-aspect-nightly.html
#    expire_in: 1 week
