dist: focal

stages:
  - build-test
  # - deploy

jobs:
  include:
    - stage: build-test
      language: java
      jdk: openjdk19
      before_install:
        - chmod +x gradlew
      script:
        - bash ./gradlew test jacocoJupTestReport

    - stage: build-test
      language: python
      python: 3.11
      script:
        - python --version
        - pip install --upgrade pip
        - pip install -r requirements.txt
        - coverage3 run scripts/run_unit_tests.py

    # - stage: deploy
    #   language: python
    #   python: 3.11
    #   script:
    #     - python scripts/get_problems_count.py
    #https://caveofcode.com/2017/05/publish-an-angular-app-to-github-pages/
    # deploy:
    #   provider: pages
    #   edge: true
    #   skip_cleanup: true
    #   github_token: $GITHUB_TOKEN
    #   keep_history: false
    #   commit_message: Travis CI Updates [ci skip]
    #   local_dir: website
    #   on:
    #     branch: main
    #   target_branch: gh-pages

branches:
  only:
    - main
