From a714a1129dc5236b0ddc24dc95fecfdf2d822255 Mon Sep 17 00:00:00 2001 From: Christopher Gallo Date: Tue, 14 Apr 2020 14:28:51 -0500 Subject: [PATCH 1/4] Adding more github action tests, removing travis CI tests --- .github/workflows/documentation.yml | 2 +- .github/workflows/tests.yml | 54 +++++++++++++++++++++++++++++ .travis.yml | 27 --------------- SoftLayer/CLI/ticket/__init__.py | 4 +-- SoftLayer/CLI/ticket/detail.py | 2 +- 5 files changed, 58 insertions(+), 31 deletions(-) create mode 100644 .github/workflows/tests.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 424eb7c26..c713212ee 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -1,4 +1,4 @@ -name: softlayer +name: documentation on: push: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 000000000..d2cab7484 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,54 @@ +name: Tests + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.5,3.6,3.7,3.8] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r tools/test-requirements.txt + - name: Tox + run: tox -e + coverage: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: 3.8 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r tools/test-requirements.txt + - name: Tox + run: tox -e coverage + analysis: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: 3.8 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r tools/test-requirements.txt + - name: Tox + run: tox -e analysis \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 35c987a63..000000000 --- a/.travis.yml +++ /dev/null @@ -1,27 +0,0 @@ -# https://docs.travis-ci.com/user/languages/python/#python-37-and-higher -dist: bionic -language: python -sudo: false -matrix: - include: - - python: "3.5" - env: TOX_ENV=py35 - - python: "3.6" - env: TOX_ENV=py36 - - python: "3.7" - env: TOX_ENV=py37 - - python: "3.8" - env: TOX_ENV=py38 - - python: "pypy3" - env: TOX_ENV=pypy3 - - python: "3.6" - env: TOX_ENV=analysis - - python: "3.6" - env: TOX_ENV=coverage -install: - - pip install tox - - pip install coveralls -script: - - tox -e $TOX_ENV -after_success: - - if [[ $TOX_ENV = "coverage" ]]; then coveralls; fi diff --git a/SoftLayer/CLI/ticket/__init__.py b/SoftLayer/CLI/ticket/__init__.py index 81c248322..3aec9744b 100644 --- a/SoftLayer/CLI/ticket/__init__.py +++ b/SoftLayer/CLI/ticket/__init__.py @@ -1,7 +1,7 @@ """Support tickets.""" +import re import click -import re from SoftLayer.CLI import formatting @@ -17,7 +17,7 @@ ] -def get_ticket_results(mgr, ticket_id, is_json = False, update_count=1): +def get_ticket_results(mgr, ticket_id, is_json=False, update_count=1): """Get output about a ticket. :param integer id: the ticket ID diff --git a/SoftLayer/CLI/ticket/detail.py b/SoftLayer/CLI/ticket/detail.py index a7c59416e..fad8a644a 100644 --- a/SoftLayer/CLI/ticket/detail.py +++ b/SoftLayer/CLI/ticket/detail.py @@ -21,7 +21,7 @@ def cli(env, identifier, count): """Get details for a ticket.""" is_json = False - if (env.format == 'json'): + if env.format == 'json': is_json = True mgr = SoftLayer.TicketManager(env.client) From 49ad0562743031281816561121e15a847ffd5b5c Mon Sep 17 00:00:00 2001 From: Christopher Gallo Date: Tue, 14 Apr 2020 14:31:57 -0500 Subject: [PATCH 2/4] fixed a typo --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d2cab7484..7351b5c51 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -23,7 +23,7 @@ jobs: python -m pip install --upgrade pip pip install -r tools/test-requirements.txt - name: Tox - run: tox -e + run: tox -e py coverage: runs-on: ubuntu-latest steps: From 91ae1ca0823a4179b0514b2c8da773adc007c647 Mon Sep 17 00:00:00 2001 From: Christopher Gallo Date: Tue, 14 Apr 2020 14:38:48 -0500 Subject: [PATCH 3/4] Fixed test names --- .github/workflows/tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7351b5c51..7aa408ed8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,7 +22,7 @@ jobs: run: | python -m pip install --upgrade pip pip install -r tools/test-requirements.txt - - name: Tox + - name: Tox Test run: tox -e py coverage: runs-on: ubuntu-latest @@ -36,7 +36,7 @@ jobs: run: | python -m pip install --upgrade pip pip install -r tools/test-requirements.txt - - name: Tox + - name: Tox Coverage run: tox -e coverage analysis: runs-on: ubuntu-latest @@ -50,5 +50,5 @@ jobs: run: | python -m pip install --upgrade pip pip install -r tools/test-requirements.txt - - name: Tox + - name: Tox Analysis run: tox -e analysis \ No newline at end of file From 37eb8780a36826e8e0bd306e420991d5c5aa31f4 Mon Sep 17 00:00:00 2001 From: Christopher Gallo Date: Tue, 14 Apr 2020 14:41:51 -0500 Subject: [PATCH 4/4] updated readme --- README.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 535b54597..b4a321866 100644 --- a/README.rst +++ b/README.rst @@ -1,7 +1,10 @@ SoftLayer API Python Client =========================== -.. image:: https://travis-ci.org/softlayer/softlayer-python.svg?branch=master - :target: https://travis-ci.org/softlayer/softlayer-python +.. image:: https://github.com/softlayer/softlayer-python/workflows/Tests/badge.svg + :target: https://github.com/softlayer/softlayer-python/actions?query=workflow%3ATests + +.. image:: https://github.com/softlayer/softlayer-python/workflows/documentation/badge.svg + :target: https://github.com/softlayer/softlayer-python/actions?query=workflow%3Adocumentation .. image:: https://landscape.io/github/softlayer/softlayer-python/master/landscape.svg :target: https://landscape.io/github/softlayer/softlayer-python/master