Skip to content

Commit 02a23fb

Browse files
authored
GitHub Actions Integration (#318)
* remove 2.7, 3.4, 3.5 DEPRECATION: Python 3.4 support has been deprecated. pip 19.1 will be the last one supporting it. Please upgrade your Python as Python 3.4 won't be maintained after March 2019 (cf PEP 429). * Update tox.ini * remove travis yml * fix python version to 3.x
1 parent fea8f94 commit 02a23fb

File tree

5 files changed

+72
-31
lines changed

5 files changed

+72
-31
lines changed

.github/workflows/auto-testing.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: Python package
5+
6+
on: [push, pull_request]
7+
jobs:
8+
build:
9+
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
python-version: [3.6, 3.7, 3.8, 3.9]
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
if [ -f requirements-dev.txt ]; then python -m pip install -r requirements-dev.txt; fi
25+
- name: Test with pytest
26+
run: |
27+
tox

.github/workflows/publish-to-pypi.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# This workflow will upload a Python Package using Twine when a release is created
2+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3+
4+
name: Upload Python Package
5+
6+
on:
7+
release:
8+
types: [created]
9+
10+
jobs:
11+
deploy:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up Python
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: '3.x'
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install setuptools wheel twine
25+
- name: Build and publish
26+
env:
27+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
28+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
29+
run: |
30+
python setup.py sdist bdist_wheel
31+
twine upload dist/*

.travis.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

README.rst

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
LINE Messaging API SDK for Python
22
=================================
33

4-
|Build Status| |PyPI version| |Documentation Status|
4+
|Build Status| |Documentation Status|
55

66
SDK of the LINE Messaging API for Python.
77

@@ -1276,31 +1276,29 @@ Run tests
12761276

12771277
Test by using tox. We test against the following versions.
12781278

1279-
- 2.7
1280-
- 3.4
1281-
- 3.5
12821279
- 3.6
12831280
- 3.7
1281+
- 3.8
1282+
- 3.9
12841283

12851284
To run all tests and to run ``flake8`` against all versions, use:
12861285

12871286
::
12881287

12891288
tox
12901289

1291-
To run all tests against version 2.7, use:
1290+
To run all tests against version 3.6, use:
12921291

12931292
::
12941293

1295-
$ tox -e py27
1294+
$ tox -e py3.6
12961295

1297-
To run a test against version 2.7 and against a specific file, use:
1296+
To run a test against version 3.6 and against a specific file, use:
12981297

12991298
::
13001299

1301-
$ tox -e py27 -- tests/test_webhook.py
1300+
$ tox -e py3.6 -- tests/test_webhook.py
13021301

1303-
And more... TBD
13041302

13051303
.. |Build Status| image:: https://travis-ci.org/line/line-bot-sdk-python.svg?branch=master
13061304
:target: https://travis-ci.org/line/line-bot-sdk-python

tox.ini

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py27, py34, py35, py36, py37, py38, py37-flake8-src, py37-flake8-other
2+
envlist = py3.6, py3.7, py3.8, py3.9, py3-flake8-src, py3-flake8-other
33

44
[testenv]
55
deps =
@@ -8,21 +8,21 @@ deps =
88
-r{toxinidir}/requirements-test.txt
99
commands = py.test -v tests/
1010

11-
[testenv:py37]
12-
basepython = python3.7
11+
[testenv:py3]
12+
basepython = python3
1313
deps = {[testenv]deps}
1414
commands = py.test -v --cov=linebot tests/
1515

16-
[testenv:py37-flake8-src]
17-
basepython = python3.7
16+
[testenv:py3-flake8-src]
17+
basepython = python3
1818
deps =
1919
six
2020
flake8
2121
flake8-docstrings
2222
commands = flake8 linebot/
2323

24-
[testenv:py37-flake8-other]
25-
basepython = python3.7
24+
[testenv:py3-flake8-other]
25+
basepython = python3
2626
deps =
2727
six
2828
flake8

0 commit comments

Comments
 (0)