version: '{branch}-{build}'
build_script:
  - cmd: ./gradlew.bat assemble
test_script:
  - cmd: ./gradlew.bat check
on_finish:
  - pip install --user codecov
  - codecov -e OS -f build/reports/jacoco/test/jacocoTestReport.xml
  # TODO submit multiple junit xml or combine all into single file
  - ps: |
      $url = "https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)"
      $file = '.\build\test-results\TEST-nl.esciencecenter.xenon.util.RealFileUtilsTest.xml'
      (New-Object 'System.Net.WebClient').UploadFile($url, (Resolve-Path $file))
      $file = '.\build\test-results\TEST-nl.esciencecenter.xenon.adaptors.local.LocalUtilsTest.xml'
      (New-Object 'System.Net.WebClient').UploadFile($url, (Resolve-Path $file))
artifacts:
  - path: build/distributions/*.zip
    name: Java archive

version: '{branch}-{build}'
build_script:
  - cmd: ./gradlew.bat assemble
test_script:
  - cmd: ./gradlew.bat check
on_finish:
  - "SET PATH=C:\\Python34;C:\\Python34\\Scripts;%PATH%"
  - pip install codecov
  - codecov -e OS -f build/reports/jacoco/test/jacocoTestReport.xml
  # TODO submit multiple junit xml or combine all into single file
  - ps: |
      $url = "https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)"
      $file = '.\build\test-results\TEST-nl.esciencecenter.xenon.util.RealFileUtilsTest.xml'
      (New-Object 'System.Net.WebClient').UploadFile($url, (Resolve-Path $file))
      $file = '.\build\test-results\TEST-nl.esciencecenter.xenon.adaptors.local.LocalUtilsTest.xml'
      (New-Object 'System.Net.WebClient').UploadFile($url, (Resolve-Path $file))
artifacts:
  - path: build/distributions/*.zip
    name: Java archive

Add Python 3.4 to path, it has pip.
Add Python 3.4 to path, it has pip.
