Skip to content

Commit

Permalink
[CI] Add azure pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Herklos committed May 11, 2020
1 parent ba41dcc commit 6d1a5fe
Show file tree
Hide file tree
Showing 6 changed files with 102 additions and 70 deletions.
29 changes: 0 additions & 29 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,24 +54,6 @@ jobs:
- pylint --rcfile=standard.rc $PACKAGE_FOLDER
- if [ $? -ne 1 ]; then exit 0; fi

- name: "OSX - Python 3.7-dev - Installed"
stage: test
os: osx
osx_image: xcode11 # Python 3.7.2 running on macOS 10.14.3
language: shell # 'language: python' is an error on Travis CI macOS
# python: 3.7 # 'python:' is ignored on Travis CI macOS
before_install: python3 --version ; pip3 --version ; sw_vers
before_cache:
- rm -f "$HOME/Library/Caches/pip/log/debug.log"
cache:
directories:
- "$HOME/Library/Caches/pip"
script:
- python3 setup.py build_ext --inplace
- python3 setup.py install
- rm -rf $PACKAGE_FOLDER
- pytest tests

deploy:
- provider: pypi
username: __token__
Expand All @@ -84,31 +66,20 @@ deploy:
repo: "$GH_REPO"
branch: "$DEPLOY_BRANCH"
tags: true
condition: "$TRAVIS_OS_NAME = 'linux'"
- provider: script
script: docker run -it -e PYPI_USERNAME=$PYPI_USERNAME -e PYPI_PASSWORD=$PYPI_PASSWORD -v $(pwd):/project drakkarsoftware/octobot-pypi-deploy:i686 "i686" "cp37-cp37m" "cp37"
cleanup: true
on:
repo: "$GH_REPO"
branch: "$DEPLOY_BRANCH"
tags: true
condition: "$TRAVIS_OS_NAME = 'linux'"
- provider: script
script: docker run -it -e PYPI_USERNAME=$PYPI_USERNAME -e PYPI_PASSWORD=$PYPI_PASSWORD -v $(pwd):/project drakkarsoftware/octobot-pypi-deploy:x86_64 "x86_64" "cp37-cp37m" "cp37"
cleanup: true
on:
repo: "$GH_REPO"
branch: "$DEPLOY_BRANCH"
tags: true
condition: "$TRAVIS_OS_NAME = 'linux'"
- provider: script
script: python3 setup.py bdist_wheel && python3 -m twine upload dist/* -u $PYPI_USERNAME -p $PYPI_PASSWORD --skip-existing
cleanup: true
on:
repo: "$GH_REPO"
branch: "$DEPLOY_BRANCH"
tags: true
condition: "$TRAVIS_OS_NAME = 'osx'"

after_failure:
- wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.3.26] - 2020-05-11
### Added
- [CI] Azure pipeline

### Removed
- [CI] macOs build on travis
- [CI] Appveyor builds

## [1.3.25] - 2020-05-10
### Updated
- Telegram requirements
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# OctoBot-Commons [1.3.25](https://github.com/Drakkar-Software/OctoBot-Commons/blob/master/CHANGELOG.md)
# OctoBot-Commons [1.3.26](https://github.com/Drakkar-Software/OctoBot-Commons/blob/master/CHANGELOG.md)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/b31f3ab3511744a5a5ca6b9bb48e77bb)](https://app.codacy.com/gh/Drakkar-Software/OctoBot-Commons?utm_source=github.com&utm_medium=referral&utm_content=Drakkar-Software/OctoBot-Commons&utm_campaign=Badge_Grade_Dashboard)
[![PyPI](https://img.shields.io/pypi/v/OctoBot-Commons.svg)](https://pypi.python.org/pypi/OctoBot-Commons/)
[![Coverage Status](https://coveralls.io/repos/github/Drakkar-Software/OctoBot-Commons/badge.svg?branch=master)](https://coveralls.io/github/Drakkar-Software/OctoBot-Commons?branch=master)
Expand Down
39 changes: 0 additions & 39 deletions appveyor.yml

This file was deleted.

92 changes: 92 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
trigger:
branches:
include:
- master
tags:
include:
- '*'
paths:
include:
- '*'

pr:
autoCancel: true
branches:
include:
- '*'

jobs:
- job: Windows
pool:
vmImage: 'windows-latest'
strategy:
maxParallel: 2
matrix:
Python36-32bit-full:
PYTHON_VERSION: '3.7'
PYTHON_ARCH: 'x86'
Python36-64bit-full:
PYTHON_VERSION: '3.7'
PYTHON_ARCH: 'x64'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: $(PYTHON_VERSION)
addToPath: true
architecture: $(PYTHON_ARCH)
- script: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --prefer-binary -r requirements.txt -r dev_requirements.txt
displayName: 'Install dependencies'
- script: |
python setup.py build_ext --inplace
python setup.py install
displayName: 'Install OctoBot-Commons'
- script: python -m pytest tests
displayName: 'Run OctoBot-Commons tests'
- script: python setup.py bdist_wheel
displayName: 'Building wheel'
- task: TwineAuthenticate@1
condition: startsWith(variables['build.sourceBranch'], 'refs/tags/')
displayName: 'Official Twine Authenticate'
inputs:
pythonUploadServiceConnection: pypi-official
- script: python -m twine upload -r "pypi-official" --config-file $(PYPIRC_PATH) --skip-existing dist/*
condition: startsWith(variables['build.sourceBranch'], 'refs/tags/')
displayName: 'Uploading wheel'

- job: macOS
pool:
vmImage: 'macOS-latest'
strategy:
maxParallel: 2
matrix:
Python36-64bit-full:
PYTHON_VERSION: '3.7'
PYTHON_ARCH: 'x64'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: $(PYTHON_VERSION)
addToPath: true
architecture: $(PYTHON_ARCH)
- script: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --prefer-binary -r requirements.txt -r dev_requirements.txt
displayName: 'Install dependencies'
- script: |
python setup.py build_ext --inplace
python setup.py install
displayName: 'Install OctoBot-Commons'
- script: python -m pytest tests
displayName: 'Run OctoBot-Commons tests'
- script: python setup.py bdist_wheel
displayName: 'Building wheel'
- task: TwineAuthenticate@1
condition: startsWith(variables['build.sourceBranch'], 'refs/tags/')
displayName: 'Official Twine Authenticate'
inputs:
pythonUploadServiceConnection: pypi-official
- script: python -m twine upload -r "pypi-official" --config-file $(PYPIRC_PATH) --skip-existing dist/*
condition: startsWith(variables['build.sourceBranch'], 'refs/tags/')
displayName: 'Uploading wheel'
2 changes: 1 addition & 1 deletion octobot_commons/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# License along with this library.

PROJECT_NAME = "OctoBot-Commons"
VERSION = "1.3.25" # major.minor.revision
VERSION = "1.3.26" # major.minor.revision

MARKET_SEPARATOR = "/"
DICT_BULLET_TOKEN_STR = "\n "
Expand Down

0 comments on commit 6d1a5fe

Please sign in to comment.