@@ -26,18 +26,14 @@ jobs:
26
26
uses : actions/setup-python@v4
27
27
with :
28
28
python-version : ${{ matrix.python-version }}
29
+ - name : Install pandoc
30
+ run : sudo apt-get install -y pandoc
29
31
- name : Install ${{ env.package }}
30
32
run : |
31
33
python -m pip install --upgrade pip
32
- python -m pip install flake8 pytest pytest-cov pytest-pythonpath coverage
34
+ python -m pip install pytest pytest-cov pytest-pythonpath coverage
33
35
pip install -r requirements.txt
34
36
pip install .
35
- - name : Lint with flake8
36
- run : |
37
- # stop the build if there are Python syntax errors or undefined names
38
- flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
39
- # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
40
- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
41
37
- name : Test ${{ env.package }} with pytest
42
38
run : |
43
39
pytest --cov=$package
48
44
cov_badge_path : docs/coverage.svg
49
45
steps :
50
46
- uses : actions/checkout@v3
47
+ - name : Set up Python ${{ matrix.python-version }}
48
+ uses : actions/setup-python@v4
49
+ with :
50
+ python-version : " 3.12"
51
+ - name : Install pandoc
52
+ run : sudo apt-get install -y pandoc notification-daemon
51
53
- name : Install ${{ env.package }}
52
54
run : |
53
55
python -m pip install --upgrade pip
79
81
branch : ${{ github.ref }}
80
82
deploy :
81
83
runs-on : ubuntu-latest
82
- if : ${{ github.event.workflow_run.conclusion == 'success' }}
84
+ needs : coverage
83
85
steps :
84
86
- uses : actions/checkout@v3
85
87
with :
97
99
sed -ri 's/^(##*)\s*:.*:\s*/\1 /g' README.md
98
100
awk '{if (match($0,"## Supporters")) exit; print}' README.md > README
99
101
mv -f README README.md
100
- - run : python3 -m pip install --upgrade build && python3 -m build
101
- - name : Upload ${{ env.package }} to PyPI
102
+ - if : steps.filter.outputs.version == 'true'
103
+ name : Build ${{ env.package }} package
104
+ run : python3 -m pip install --upgrade build && python3 -m build
105
+ - if : steps.filter.outputs.version == 'true'
106
+ name : Upload ${{ env.package }} to PyPi
102
107
uses : pypa/gh-action-pypi-publish@release/v1
103
108
with :
104
109
password : ${{ secrets.PYPI_API_TOKEN }}
0 commit comments