Skip to content

Commit

Permalink
WFESO-4474 Move to Github Actions from TravisCI (#62)
Browse files Browse the repository at this point in the history
* Move to Github Actions from TravisCI

* Update publish action

* Update Swagger Version and GH Actions.

* Autogenerated Update v2.126.1.

* Replace Nose Runner With Unittest.

Co-authored-by: Artem Ustinov <[email protected]>
Co-authored-by: Artem Ustinov <[email protected]>
  • Loading branch information
3 people authored Mar 25, 2022
1 parent f85a530 commit 4b5c97b
Show file tree
Hide file tree
Showing 11 changed files with 70 additions and 33 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/python-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Build and Run Unit Tests.

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install -r requirements.txt
- name: Test
run: python -m unittest discover
35 changes: 35 additions & 0 deletions .github/workflows/python-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build and Publish to PyPI

on:
push:
branches:
- master

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install Dependencies
run: |
python -m pip install -U pip setuptools wheel
python -m pip install -U build
- name: Build Package
run: python -m build

- name: Publish Package to TestPypi
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/

- name: Publish package
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@mster
with:
password: ${{ secrets.PYPI_API_TOKEN }}
2 changes: 1 addition & 1 deletion .swagger-codegen/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.4.21
2.4.26
2 changes: 1 addition & 1 deletion .swagger-codegen/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"gitUserId": "wavefrontHQ",
"packageName": "wavefront_api_client",
"packageUrl": "https://github.com/wavefrontHQ/python-client",
"packageVersion": "2.124.1"
"packageVersion": "2.126.1"
}
2 changes: 1 addition & 1 deletion .swagger-codegen/config.jsone
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"gitUserId": "wavefrontHQ",
"packageName": "wavefront_api_client",
"packageUrl": "https://github.com/wavefrontHQ/python-client",
"packageVersion": "2.122.1"
"packageVersion": "2.124.1"
}
25 changes: 0 additions & 25 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:

- API version: v2
- Package version: 2.124.1
- Package version: 2.126.1
- Build package: io.swagger.codegen.languages.PythonClientCodegen

## Requirements.
Expand Down
2 changes: 1 addition & 1 deletion generate_client
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function _exit {
[[ "$1" ]] || _exit "Please specify cluster as an argument."

CGEN_NAME="swagger-codegen-cli"
CGEN_VER="2.4.21" # For 3.x use CGEN_VER="3.0.27"
CGEN_VER="2.4.26" # For 3.x use CGEN_VER="3.0.27"
CGEN_JAR_NAME="${CGEN_NAME}-${CGEN_VER}.jar"
CGEN_JAR_URL="https://search.maven.org/remotecontent?filepath=\
io/swagger/swagger-codegen-cli/${CGEN_VER}/${CGEN_JAR_NAME}"
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from setuptools import setup, find_packages # noqa: H301

NAME = "wavefront-api-client"
VERSION = "2.124.1"
VERSION = "2.126.1"
# To install the library, run the following
#
# python setup.py install
Expand Down
2 changes: 1 addition & 1 deletion wavefront_api_client/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
self.user_agent = 'Swagger-Codegen/2.124.1/python'
self.user_agent = 'Swagger-Codegen/2.126.1/python'
self.client_side_validation = configuration.client_side_validation

def __del__(self):
Expand Down
2 changes: 1 addition & 1 deletion wavefront_api_client/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,5 +251,5 @@ def to_debug_report(self):
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: v2\n"\
"SDK Package Version: 2.124.1".\
"SDK Package Version: 2.126.1".\
format(env=sys.platform, pyversion=sys.version)

0 comments on commit 4b5c97b

Please sign in to comment.