Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ commit = True
search = __version__ = '{current_version}'
replace = __version__ = '{new_version}'

[bumpversion:file:setup.py]
search = __version__ = '{current_version}'
replace = __version__ = '{new_version}'
[bumpversion:file:setup.cfg]
search = version = '{current_version}'
replace = version = '{new_version}'
45 changes: 31 additions & 14 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,36 +17,53 @@ on:

jobs:
build_test:
name: Build and Test on Python ${{ matrix.python-version }} and ${{ matrix.os }}
name: Build on Python ${{ matrix.python-version }} using ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.5', '3.6', '3.7', '3.8']
os: [ubuntu-latest]
python-version: ['3.6', '3.7', '3.8']
os: [ubuntu-latest, windows-latest]
exclude:
- os: windows-latest
python-version: '3.6'
- os: windows-latest
python-version: '3.7'

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
- name: Install dependencies (ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
pip3 install -r requirements.txt
pip3 install -r requirements-dev.txt --use-deprecated=legacy-resolver
pip3 install -r requirements-dev.txt
pip3 install --editable .
- name: Execute Python unit tests for code coverage
if: matrix.python-version == '3.5'
- name: Install dependencies (windows)
if: matrix.os == 'windows-latest'
run: |
pip3 install -r requirements.txt --use-deprecated=legacy-resolver
pip3 install -r requirements-dev.txt --use-deprecated=legacy-resolver
pip3 install --editable . --use-deprecated=legacy-resolver
- name: Execute Python 3.6/3.7 unit tests
if: matrix.python-version != '3.8'
run: |
pip3 install -U python-dotenv
py.test test/unit
- name: Execute Python 3.8 unit tests (windows)
if: matrix.os == 'windows-latest'
run: |
pip3 install -U python-dotenv
py.test --reruns 3 --cov=ibm_watson
py.test test/unit --reruns 3
- name: Execute Python 3.8 unit tests (ubuntu)
if: matrix.python-version == '3.8' && matrix.os == 'ubuntu-latest'
run: |
pip3 install -U python-dotenv
py.test test/unit --reruns 3 --cov=ibm_watson
- name: Upload coverage to Codecov
if: matrix.python-version == '3.5'
if: matrix.python-version == '3.8' && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v1
with:
name: py${{ matrix.python-version }}-${{ matrix.os }}
- name: Execute Python unit tests
if: matrix.python-version != '3.5'
run: |
pip3 install -U python-dotenv
py.test
21 changes: 5 additions & 16 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ on:
branches: [ master ]
types:
- completed

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

Expand All @@ -34,11 +33,6 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: 12
- name: Install dependencies
run: |
pip3 install -r requirements.txt
pip3 install -r requirements-dev.txt --use-deprecated=legacy-resolver
pip3 install --editable .
- name: Install Semantic Release dependencies
run: |
sudo apt-get install bumpversion
Expand All @@ -49,8 +43,10 @@ jobs:
npm install -g @semantic-release/github
npm install -g @semantic-release/commit-analyzer
npm install -g @semantic-release/release-notes-generator
npm install -g semantic-release-pypi
pip3 install setuptools wheel twine
- name: Publish js docs
if: github.event.workflow_run.conclusion == 'success' && startsWith(github.ref, 'refs/tags')
if: ${{ github.event.workflow_run.conclusion == 'success' }}
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GHA_BRANCH: ${{ github.ref }} # non PR only need to get last part
Expand All @@ -63,14 +59,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release --dry-run
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: npx semantic-release #--dry-run --branches 9388_gha Uncomment for testxing purposes
- name: Build binary wheel and a source tarball
run: python setup.py sdist
- name: Publish a Python distribution to PyPI # must have built dist before
if: github.event.workflow_run.conclusion == 'success' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_PASSWORD }}
user: watson-devex
repository_url: https://upload.pypi.org/legacy
verbose: false
6 changes: 6 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
"message": "chore(release): ${nextRelease.version} release notes\n\n${nextRelease.notes}"
}
],
[
"semantic-release-pypi",
{
"repoUrl": "https://upload.pypi.org/legacy"
}
],
"@semantic-release/github"
]
}
45 changes: 0 additions & 45 deletions .travis.yml

This file was deleted.

2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[metadata]
version = 5.2.0
3 changes: 0 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
import os
import sys

__version__ = '5.2.0'


if sys.argv[-1] == 'publish':
# test server
Expand Down Expand Up @@ -61,7 +59,6 @@ def run_tests(self):


setup(name='ibm-watson',
version=__version__,
description='Client library to use the IBM Watson Services',
license='Apache 2.0',
install_requires=['requests>=2.0, <3.0', 'python_dateutil>=2.5.3', 'websocket-client==0.48.0', 'ibm_cloud_sdk_core>=3.3.6, == 3.*'],
Expand Down