dist: xenial
services: xvfb

addons:
  apt:
    update: true
    packages:
      - freeglut3-dev

language: python
matrix:
  include:
    - name: "Python 3.7 on Linux"
    - python:
        - "3.7"
        - "3.8"
        - "pypy3"
    - name: "Python 3.7 on MacOS"
      os: osx
      osx_image: xcode11
      language: shell

before_install: pip3 install --upgrade pip flake8 pytest lektor
install: python3 setup.py install

before_script: flake8 . --count --exclude=./.*,*/future/* --select=E9,F63,F7,F82 --show-source --statistics || true
script: pytest --ignore=tests/base --ignore=tests/interactive --ignore=tests/integration --ignore=tests/unit/text/test_layout.py

deploy:
  provider: script
  script: lektor --project website deploy
