version: 1.0.{build}

branches:
  except:
    - gh-pages

skip_tags: true

image:
  - Visual Studio 2022
  - Ubuntu

stack: node 16, jdk 19, python 3.11 x64

install:
  - cmd: choco install openjdk
  #- cmd: "SET JAVA_HOME=C:\\Program Files\\Java\\jdk16"
  - cmd: "SET JAVA_HOME=C:\\Program Files\\OpenJDK\\jdk-19"
  - cmd: "SET PATH=%JAVA_HOME%\\bin;%path%"
  - cmd: "SET PYTHON3=C:\\Python311-x64"
  - cmd: "SET PATH=%PYTHON3%;%PYTHON3%\\Scripts;%path%"
  - cmd: java --version
  - cmd: python --version"
  - cmd: python -m pip install -r requirements.txt
  - sh: java -version
  - sh: whereis python3.11
  - sh: . /home/appveyor/venv3.11/bin/activate
  - sh: python --version
  - sh: pip install -r requirements.txt

build_script:
  - cmd: .\gradlew.bat build
  - sh: bash ./gradlew build

test_script:
  - cmd: .\gradlew.bat test jacocoJupTestReport
  - cmd: coverage-3.11 run scripts\\run_unit_tests.py
  - sh: bash ./gradlew test jacocoJupTestReport
  - sh: coverage-3.11 run scripts/run_unit_tests.py

after_test:
  - cmd: python scripts\\get_problems_count.py
  - sh: python3.11 scripts/get_problems_count.py
