@@ -6,19 +6,23 @@ name: Python
66on :
77 push :
88 branches :
9- - ' master'
9+ - master
1010 pull_request :
1111 branches :
12- - ' master'
12+ - master
13+ workflow_dispatch :
14+
15+ concurrency :
16+ group : ${{ github.ref }}
17+ cancel-in-progress : true
1318
1419jobs :
1520 test :
1621 runs-on : ${{ matrix.os }}
1722 strategy :
18- fail-fast : false
1923 matrix :
2024 os : [ ubuntu-latest, macos-latest, windows-latest ]
21- python-version : [ '3.6', '3. 7', '3.8', '3.9', '3.10' ]
25+ python-version : [ '3.7', '3.8', '3.9', '3.10' ]
2226 include :
2327 - os : ubuntu-latest
2428 pip-cache : ~/.cache/pip
6266 - name : Test
6367 run : |
6468 make test
65- - name : Upload Code Coverage
66- env :
67- CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
68- run : |
69- poetry run codecov
70-
71- testpypi :
72- needs : [ test ]
73- if : always() && !(github.ref == 'refs/heads/master' || startsWith(github.head_ref, 'dependabot/pip/') )
74- runs-on : ubuntu-latest
75- steps :
76- - uses : actions/checkout@v2
77- - name : Set up Python
78- uses : actions/setup-python@v2
79- with :
80- python-version : ' 3.x'
81- - name : Install dependencies
82- run : |
83- make install-actions
84- - name : Build package
85- run : |
86- poetry config repositories.testpypi https://test.pypi.org/legacy/
87- poetry config http-basic.testpypi ${{ secrets.TEST_PYPI_USER }} ${{ secrets.TEST_PYPI_PASS }}
88- poetry build
89- - name : Publish package
90- run : |
91- poetry publish -r testpypi
92-
93- pypi :
94- needs : [ test ]
95- if : always() && github.ref == 'refs/heads/master'
96- runs-on : ubuntu-latest
97- steps :
98- - uses : actions/checkout@v2
99- - name : Set up Python
100- uses : actions/setup-python@v2
101- with :
102- python-version : ' 3.x'
103- - name : Install dependencies
104- run : |
105- make install-actions
106- - name : Build package
107- run : |
108- poetry config http-basic.pypi ${{ secrets.PYPI_USER }} ${{ secrets.PYPI_PASS }}
109- poetry build
110- - name : Publish package
111- run : |
112- poetry publish
69+ - name : Code Coverage
70+ 71+ if : ${{ success() }}
0 commit comments