version: "{build}-{branch}"

branches:
  except: 
    - gh-pages

init:
  - ps: choco install -y pester

build: off

test_script:
  - ps: invoke-pester -path test/ -outputfile TestResults.xml -outputformat NUnitXML
  - ps: (new-object net.webclient).uploadfile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (resolve-path ./TestResults.xml))

notifications:
  - provider: Slack
    auth_token:
      secure: lzkktSx/4RFbuzbztN3ZycdGJjr6ZqapatvExhwRjB4Va9QNutHw1lGPI0hWlPAq
    channel: activity
version: "{build}-{branch}"

branches:
  except: 
    - gh-pages

init:
  - ps: choco install -y pester

build: off

test_script:
  - ps: $result = invoke-pester -path test/ -outputfile TestResults.xml -outputformat NUnitXML -passthru
  - ps: (new-object net.webclient).uploadfile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (resolve-path ./TestResults.xml))
  - ps: exit $result.FailedCount

notifications:
  - provider: Slack
    auth_token:
      secure: lzkktSx/4RFbuzbztN3ZycdGJjr6ZqapatvExhwRjB4Va9QNutHw1lGPI0hWlPAq
    channel: activity
Enable pester to exit powershell session on failure
Enable pester to exit powershell session on failure
