Skip to content

Commit fd22bc3

Browse files
committed
Gtihub workflows
1 parent c9a58db commit fd22bc3

File tree

3 files changed

+73
-0
lines changed

3 files changed

+73
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: [p1c2u]
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
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

0 commit comments

Comments
 (0)