version: 1.0.0-{build}

init:
  - SET PATH=%PYTHON%;%PYTHON%\Scripts;C:\Program Files\PostgreSQL\12\bin\;%PATH%

image:
  - Visual Studio 2019
  - Ubuntu1804
  - macos

environment:
  PGUSER: postgres
  PGPASSWORD: Password12!
  matrix:
    - PYTHON: "C:\\Python38"
      PYTHON_VERSION: "3.8.1"
      PYTHON_ARCH: "32"
    - PYTHON: "C:\\Python38-x64"
      PYTHON_VERSION: "3.8.1"
      PYTHON_ARCH: "64"

cache:
  - '%LOCALAPPDATA%\pip\Cache'

# services:
#   - postgresql12
# https://github.com/appveyor/ci/issues/3299

install:
  - pip install --upgrade --requirement requirements.txt

build_script:
  - net start postgresql-x64-12
  - createdb harmonbot
  - echo CREATE USER harmonbot WITH PASSWORD :'pgpassword' | psql --variable=pgpassword="%PGPASSWORD%"

test_script:
  - cd Discord && python Harmonbot.py
  - cd ../Telegram && python Telegram_Harmonbot.py

version: 1.0.0-{build}

init:
  - SET PATH=%PYTHON%;%PYTHON%\Scripts;C:\Program Files\PostgreSQL\12\bin\;%PATH%

image:
  - Visual Studio 2019
  - Ubuntu1804
  - macos

environment:
  PGUSER: postgres
  PGPASSWORD: Password12!
  matrix:
    - PYTHON: "C:\\Python38"
      PYTHON_VERSION: "3.8.1"
      PYTHON_ARCH: "32"
    - PYTHON: "C:\\Python38-x64"
      PYTHON_VERSION: "3.8.1"
      PYTHON_ARCH: "64"

cache:
  - '%LOCALAPPDATA%\pip\Cache'

# services:
#   - postgresql12
# https://github.com/appveyor/ci/issues/3299

install:
  - pip install --upgrade --requirement requirements.txt

build_script:
  - net start postgresql-x64-12
  - createdb harmonbot
  - echo CREATE USER harmonbot SUPERUSER PASSWORD :'pgpassword' | psql --variable=pgpassword="%PGPASSWORD%"

test_script:
  - cd Discord && python Harmonbot.py
  - cd ../Telegram && python Telegram_Harmonbot.py

Create PostgreSQL USER as SUPERUSER
[AppVeyor] Create PostgreSQL USER as SUPERUSER

