@@ -3,18 +3,41 @@ name: Link Status
33on : [push, pull_request]
44
55jobs :
6- build :
7- runs-on : ${{ matrix.operating-system }}
6+ pre-commit :
7+ name : Pre-Commit Checks
8+ runs-on : ubuntu-latest
9+ steps :
10+ - name : Checkout to master
11+ uses : actions/checkout@master
12+
13+ - name : Setup python
14+ uses : actions/setup-python@v1
15+ with :
16+ python-version : ' 3.7'
17+ architecture : ' x64'
18+
19+ - name : Pre-Commit Checks
20+ run : |
21+ python -m pip install pre-commit
22+ pre-commit run -a
23+
24+ - name : Analysis (git diff)
25+ if : failure()
26+ run : git diff
27+
28+ tests :
29+ name : Test-${{ matrix.os }}-Py${{ matrix.python-version }}
30+ needs : pre-commit
31+ runs-on : ${{ matrix.os }}
832 strategy :
933 matrix :
10- operating-system : [ubuntu-latest, windows-latest, macos-latest]
34+ os : [ubuntu-latest, windows-latest, macos-latest]
1135 python-version : [ '3.6', '3.7' ]
12- name : Python ${{ matrix.python-version }}
1336 steps :
1437 - name : Checkout to master
1538 uses : actions/checkout@master
1639
17- - name : Setup python
40+ - name : Setup Python-${{ matrix. python-version }}
1841 uses : actions/setup-python@v1
1942 with :
2043 python-version : ${{ matrix.python-version }}
2548 python -m pip install .
2649 python -m pip install -Ur dev-requirements.txt
2750
28- - name : Pre-Commit
29- run : pre-commit run -a
30-
31- - name : Analysis (git diff)
32- if : failure()
33- run : git diff
34-
3551 - name : Unit Tests
3652 run : py.test tests -v
37-
38- - name : Build Package
39- if : matrix.python-version == '3.7' && github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
40- run : |
41- python -m pip install --upgrade setuptools wheel
42- python setup.py sdist bdist_wheel
43-
44- - name : Deploy to PyPi
45- if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
46- uses : pypa/gh-action-pypi-publish@master
47- with :
48- user : __token__
49- password : ${{ secrets.pypi_linkstatus }}
0 commit comments