tubone24/ebook_homebrew

View on GitHub
.appveyor.yml

Summary

Maintainability
Test Coverage
environment:
  PYPI_PASSWORD:
    secure: E1hXZZ9LsjhERaKpZLBn3w==

  matrix:
    - TOXENV: py37

branches:
  only:
    - master

init:
  - SET PATH=%PYTHON%;%PATH%

install:
  - pip install tox
  - pip install wheel
  - pip install twine

build_script:
  - python setup.py build

test_script:
  - tox

after_test:
  - python setup.py sdist
  - python setup.py bdist_wheel
  - python setup.py bdist_wininst
  - python setup.py bdist_msi
  - ps: "ls dist"
  - echo "Starting Artifact Deployment"
  - echo [distutils]                                  > %USERPROFILE%\\.pypirc
  - echo index-servers =                             >> %USERPROFILE%\\.pypirc
  - echo     pypi                                    >> %USERPROFILE%\\.pypirc
  - echo [pypi]                                      >> %USERPROFILE%\\.pypirc
  - echo username=tubone24                           >> %USERPROFILE%\\.pypirc
  - echo password=%PYPI_PASSWORD%                    >> %USERPROFILE%\\.pypirc
  - set PATH=%BK_PATH%
  - set HOME=%USERPROFILE%
  - ps: If ($env:APPVEYOR_REPO_TAG -eq "true" -And $env:APPVEYOR_REPO_BRANCH -eq "master") { Invoke-Expression "twine upload --skip-existing dist/*" 2>$null } Else { write-output "Not on a tag on master, won't deploy to pypi"}
  - echo "Finished Artifact Deployment"

artifacts:
  - path: dist\*
    name: pypiartifacts

on_finish:
  - ps: |
      $wc = New-Object 'System.Net.WebClient'
      $wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\test_results.xml))

notifications:
  - provider: Webhook
    url: https://webhooks.gitter.im/e/aad7507945af342edab5
    method: POST
  - provider: GitHubPullRequest
    auth_token:
      secure: uyE7IjNU0mnVjSInKNP44FmvzNWU2C4iaajucgBSTZV6nd7wGvj8wFX9luXScsuL
    template: "{{#passed}}:white_check_mark:{{/passed}}{{#failed}}:x:{{/failed}} [Build {{&projectName}} {{buildVersion}} {{status}}]({{buildUrl}}) (commit {{commitUrl}} by @{{&commitAuthorUsername}})"

deploy:
  release: $(APPVEYOR_REPO_TAG_NAME)
  description: 'Appveyor Auto Release'
  provider: GitHub
  auth_token:
    secure: CXemmlpL+6wTVzfLD3GELI7H6XE0+Wp9Q6aH6dhg8ii0T7wFlaxbGr5s0O8LSG6n
  artifact: /dist\.*/
  draft: false
  prerelease: false
  on:
    branch: master
    APPVEYOR_REPO_TAG: true

cache:
  - '%LOCALAPPDATA%\pip\Cache'