version: "{build}"
clone_depth: 1
clone_folder: c:\outside-gopath
environment:
    GOPATH: c:\gopath
    GO111MODULE: on
install:
    - echo %PATH%
    - echo %GOPATH%
    - go version
    - go env
    - go get -v -t -d ./...
build: off
test_script:
    - go build ./selfupdate
    - go build ./cmd/selfupdate-example
    - go build ./cmd/detect-latest-release
    - go build ./cmd/go-get-release/
    - ps: |
        if (Test-Path env:GITHUB_TOKEN) {
            go test -v -race "-coverprofile=coverage.txt" ./selfupdate
        } else {
            go test -v -race -short ./selfupdate
        }
after_test:
    - "SET PATH=C:\\Python34;C:\\Python34\\Scripts;%PATH%"
    - pip install codecov
    - codecov -f "coverage.txt"
deploy: off
