pipeline:
  test-debian:
    image: openlp/debian
    pull: true
    commands:
      - sh scripts/generate_resources.sh
      - xvfb-run -s '-screen 0 1024x768x24' pytest-3 --color=no --disable-warnings --cov openlp --cov-report term
      - mv .coverage linux.coverage
    # artifacts:
    #   paths:
    #     - linux.coverage

  test-ubuntu:
    image: openlp/ubuntu
    pull: true
    commands:
      - sh scripts/generate_resources.sh
      - xvfb-run -s '-screen 0 1024x768x24' pytest-3 --color=no --disable-warnings

  test-fedora:
    image: openlp/fedora
    pull: true
    commands:
      - sh scripts/generate_resources.sh
      - xvfb-run -s '-screen 0 1024x768x24' pytest-3 --color=no --disable-warnings

  test-arch:
    image: openlp/arch
    pull: true
    commands:
      - sh scripts/generate_resources.sh
      - xvfb-run -s '-screen 0 1024x768x24' pytest --color=no --disable-warnings

  # test-macos:
  #   group: test
  #   tags:
  #     - macos
  #   commands:
  #     - export PATH=/opt/local/bin:$PATH
  #     - sh scripts/generate_resources.sh
  #     - python3 -m pytest --color=no --disable-warnings --cov openlp
  #     - mv .coverage macos.coverage
  #   artifacts:
  #     paths:
  #       - macos.coverage
  #   when:
  #     branch: master
  #     repo: openlp/openlp

  test-display:
    image: openlp/angular
    pull: true
    commands:
      - yarn install
      - yarn test --browsers ChromiumHeadlessCI

depends_on:
  - lint
