Skip to content

Commit ffba045

Browse files
authored
Merge pull request #104 from p1c2u/feature/github-actions
Github actions
2 parents db196c9 + 010f854 commit ffba045

File tree

4 files changed

+73
-8
lines changed

4 files changed

+73
-8
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: [p1c2u]

.github/workflows/python-publish.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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: Publish python packages
5+
6+
on:
7+
workflow_dispatch:
8+
release:
9+
types:
10+
- created
11+
12+
jobs:
13+
publish:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
python-version: [2.7, 3.6]
18+
steps:
19+
- uses: actions/checkout@v2
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v2
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install setuptools wheel twine
28+
- name: Build
29+
run: python setup.py sdist bdist_wheel
30+
- name: Publish wheel
31+
env:
32+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
33+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
34+
run: twine upload dist/*.whl
35+
- name: Publish source
36+
env:
37+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
38+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
39+
run: twine upload dist/*.tar.gz || true

.github/workflows/python-test.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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: Test python code
5+
6+
on:
7+
push:
8+
pull_request:
9+
types: [opened, synchronize]
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9]
17+
fail-fast: false
18+
steps:
19+
- uses: actions/checkout@v2
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v2
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install -r requirements.txt
28+
pip install -r requirements_dev.txt
29+
pip install -e .
30+
- name: Test
31+
run: python setup.py test
32+
- name: Upload coverage
33+
uses: codecov/codecov-action@v1

.travis.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,3 @@ script:
3030
- python setup.py test
3131
after_success:
3232
- codecov
33-
deploy:
34-
provider: pypi
35-
user: p1c2u
36-
password:
37-
secure: mQCKjaqTpkDhTRCSZtdt5d3tOs/d1vc8PDAna5Gr5prMbosq5stG3HdTK3qK5AbfNghclFYZH726zD2i4LdBWmHoA50TJn6mud3k0Byt+fEpnFIHgb8B2hhOQiiG/LxO1X+oRQI+2NL6TQagxJZzSArqaY4p83RAoLNjlf8LpgQu6qjERFkxMaSCrDfDWJ8MBFINMiZ5ZCq3NF8Rclaesv7HKAaYc8591grjouR8FBoVIPG7EWCZP8lp4CVEz6XlBZV8DDmUuhIhqWRkf6jS1zMbd0fUB7iKh2vHDHSWx9kGsxSRCqISDy3ywVUcee6O5M06RwzlpDSML+vuBHYvr8KX5LWSoaOcZfRNjGYIv437t+81Bl1d34GogI/Abm8WxG92KYt5+//6bKk7byck76ZLvuxV/lPtLjg0Caya9zVk/SE0GEa5N+Da04SHJqML88dS9ImbKchOnP1nUb/oUFA8SADFaMonxLbqe2k+PTLymZVTv0apPpiDXKpUF0K1+1WdggDRyr9WFhoBB7KYme6uQLLi78vmDo4gZzG+NvPYoux/VVsbm+upZdqRFL1jX8GGYMu/VbFwN3EHCAH3b6kFZFijZuTgCsIGvMfU2j/tJpLGUJLN8uLJlN88PqPxU4iz7lVKRU29hLwnCWY9yjPdTCZn0gdcZuosv6leNlc=
38-
distributions: sdist bdist_wheel
39-
on:
40-
tags: true

0 commit comments

Comments
 (0)