Skip to content

Add testing and support for python 3.9. #1429

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 2, 2021
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
46 changes: 23 additions & 23 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
name: Release
on:
release:
types: [published]
jobs:
release:
runs-on: ubuntu-latest
strategy:
matrix:
arch: ['armhf','amd64','arm64','ppc64el','s390x','i386']
steps:
- name: Install Snapcraft
uses: samuelmeuli/action-snapcraft@v1.1.1
with:
snapcraft_token: ${{ secrets.snapcraft_token }}
- name: Push to stable
run: |
VERSION=`snapcraft list-revisions slcli --arch ${{ matrix.arch }} | grep "edge\*" | awk '{print $1}'`
echo Publishing $VERSION on ${{ matrix.arch }}
snapcraft release slcli $VERSION stable
name: Release

on:
release:
types: [published]

jobs:
release:
runs-on: ubuntu-18.04
strategy:
matrix:
arch: ['armhf','amd64','arm64','ppc64el','s390x','i386']
steps:
- name: Install Snapcraft
uses: samuelmeuli/action-snapcraft@v1.2.0
with:
snapcraft_token: ${{ secrets.snapcraft_token }}
- name: Push to stable
run: |
VERSION=`snapcraft list-revisions slcli --arch ${{ matrix.arch }} | grep "edge\*" | awk '{print $1}'`
echo Publishing $VERSION on ${{ matrix.arch }}
snapcraft release slcli $VERSION stable

108 changes: 54 additions & 54 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,54 +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 Test
run: tox -e py
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 Coverage
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 Analysis
run: tox -e analysis
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,3.9]

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 Test
run: tox -e py
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r tools/test-requirements.txt
- name: Tox Coverage
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.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r tools/test-requirements.txt
- name: Tox Analysis
run: tox -e analysis
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ If you are using the library directly in python, you can do something like this.

System Requirements
-------------------
* Python 3.5, 3.6, 3.7, or 3.8.
* Python 3.5, 3.6, 3.7, 3.8, or 3.9.
* A valid SoftLayer API username and key.
* A connection to SoftLayer's private network is required to use
our private network API endpoints.
Expand All @@ -150,6 +150,6 @@ Python Packages

Copyright
---------
This software is Copyright (c) 2016-2019 SoftLayer Technologies, Inc.
This software is Copyright (c) 2016-2021 SoftLayer Technologies, Inc.

See the bundled LICENSE file for more information.
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
],
Expand Down
4 changes: 2 additions & 2 deletions tests/CLI/modules/user_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"""
import json
import sys
import unittest

import mock
import testtools

from SoftLayer import testing

Expand Down Expand Up @@ -168,7 +168,7 @@ def test_create_user_no_confirm(self, confirm_mock):
result = self.run_command(['user', 'create', 'test', '-e', '[email protected]', '-p', 'testword'])
self.assertEqual(result.exit_code, 2)

@testtools.skipIf(sys.version_info < (3, 6), "Secrets module only exists in version 3.6+")
@unittest.skipIf(sys.version_info < (3, 6), "Secrets module only exists in version 3.6+")
@mock.patch('secrets.choice')
@mock.patch('SoftLayer.CLI.formatting.confirm')
def test_create_user_generate_password_36(self, confirm_mock, secrets):
Expand Down
1 change: 0 additions & 1 deletion tools/test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ pytest
pytest-cov
mock
sphinx
testtools
ptable >= 0.9.2
click >= 7
requests >= 2.20.0
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py35,py36,py37,py38,pypy3,analysis,coverage,docs
envlist = py35,py36,py37,py38,py39,pypy3,analysis,coverage,docs


[flake8]
Expand Down