image:
  - Ubuntu2004
  - Ubuntu2204
  - macos
  - Visual Studio 2022
for:
  -
    matrix:
      only:
        - image: Visual Studio 2022
    cache:
      - C:\ProgramData\chocolatey\bin -> appveyor.yml
      - C:\ProgramData\chocolatey\lib -> appveyor.yml
    environment:
      PYTHON: "C:\\Python37-x64"
      PYTHON_VERSION: "3.7.x"
      PYTHON_ARCH: "64"
      APPVEYOR_BAKE_IMAGE: pywebview-visualstudio2022
    install:
      - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
      - "choco install webview2-runtime --ignore-checksums"
      - "python --version"
      - "python -c \"import struct; print(struct.calcsize('P') * 8)\""

      - "%CMD_IN_ENV% pip install -r requirements.txt"
      - "%CMD_IN_ENV% pip install \"pytest>=4.3.0\" six pythonnet bottle .[cef]"
    test_script:
      - cd tests
      - powershell -File ./run.ps1
  -
    matrix:
      only:
        - image: Ubuntu2004
    environment:
      PYWEBVIEW_GUI: qt
      DISPLAY: :99
      QT_QPA_PLATFORM: offscreen
    install:
      - sudo apt-get update -q
      - sudo apt-get install --no-install-recommends -y xvfb python3-pyqt5 python3-pyqt5.qtwebkit libqt5webkit5-dev python3-pep8 pyflakes python3-pytest python3-six
      - python3 -m pip install proxy_tools pytest bottle typing_extensions QtPy PyQt5 pyqtwebengine
    before_test:
      - /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1920x1200x24 -ac +extension GLX +render -noreset && sleep 3;
    test_script:
      - cd tests
      - ./run.sh
    after_test:
      - killall Xvfb
  -
    matrix:
      only:
        - image: Ubuntu2204
    environment:
      PYWEBVIEW_GUI: gtk
      DISPLAY: :99
    install:
      - sudo apt-get update -q
      - sudo apt-get install --no-install-recommends -y xvfb gir1.2-gtk-3.0 gir1.2-webkit2-4.0 python3-gi python3-gi-cairo python3-pep8 pyflakes3 python3-pytest python3-six
      - python3 -m pip install proxy_tools pytest bottle typing_extensions pygobject
    before_test:
      - /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1920x1200x24 -ac +extension GLX +render -noreset && sleep 3;
    test_script:
      - cd tests
      - ./run.sh
    after_test:
      - killall Xvfb
  -
    matrix:
      only:
        - image: macos
    install:
      - python3 -m pip install --user pyobjc pytest proxy_tools bottle six typing_extensions
    test_script:
      - cd tests
      - ./run.sh

build: off
