Skip to content

Commit 20af219

Browse files
authored
Merge pull request #22 from Anselmoo/Release-Pipeline
Changes to workflow
2 parents c7e096b + 4a257c2 commit 20af219

File tree

3 files changed

+67
-22
lines changed

3 files changed

+67
-22
lines changed

.github/workflows/pypi_publish.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Upload Python Package
2+
3+
on:
4+
release:
5+
types: [created]
6+
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.txt ]; then pip install -r requirements.txt; fi
25+
if [ -f dev-requirements.txt ]; then pip install -r dev-requirements.txt; fi
26+
- name: Lint with flake8, black, isort, pydocstyle
27+
run: |
28+
flake8 bashplot/ --count --statistic
29+
black . --check -v
30+
isort . --check -v
31+
flake8 . --count --exit-zero --max-complexity=10 --statistics
32+
pydocstyle --convention=numpy -e bashplot/bashplot.py
33+
- name: Install bashplot
34+
run: |
35+
pip install .
36+
- name: Test with pytest and coverage
37+
run: |
38+
coverage run -m pytest -vv
39+
coverage report -m
40+
coverage xml
41+
- name: Codecov
42+
uses: codecov/codecov-action@v1
43+
with:
44+
token: ${{ secrets.CODECOV_TOKEN }}
45+
env_vars: OS,PYTHON
46+
deploy:
47+
48+
runs-on: ubuntu-latest
49+
needs: build
50+
steps:
51+
- uses: actions/checkout@v2
52+
- name: Set up Python
53+
uses: actions/setup-python@v2
54+
with:
55+
python-version: '3.x'
56+
- name: Install dependencies
57+
run: |
58+
python -m pip install --upgrade pip
59+
pip install setuptools wheel twine
60+
- name: Build and publish
61+
env:
62+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
63+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
64+
run: |
65+
python setup.py sdist bdist_wheel
66+
twine upload dist/*

.github/workflows/python-package.yml

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -48,24 +48,3 @@ jobs:
4848
with:
4949
token: ${{ secrets.CODECOV_TOKEN }}
5050
env_vars: OS,PYTHON
51-
deploy:
52-
runs-on: ubuntu-latest
53-
needs: build
54-
steps:
55-
- uses: actions/checkout@v2
56-
- name: Set up Python
57-
uses: actions/setup-python@v2
58-
with:
59-
python-version: '3.8'
60-
- name: Install dependencies
61-
run: |
62-
python -m pip install --upgrade pip
63-
pip install setuptools wheel twine
64-
- name: Build and publish on PyPi
65-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
66-
env:
67-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
68-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
69-
run: |
70-
python setup.py sdist bdist_wheel
71-
twine upload dist/*

bashplot/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
"""bashplot."""
2-
__version__ = "0.3"
2+
__version__ = "0.3_1"

0 commit comments

Comments
 (0)