|
8 | 8 |
|
9 | 9 | jobs:
|
10 | 10 |
|
| 11 | + lint: |
| 12 | + strategy: |
| 13 | + fail-fast: false |
| 14 | + matrix: |
| 15 | + lint-command: |
| 16 | + - "bandit -r hijack -x hijack/tests" |
| 17 | + - "black --check --diff ." |
| 18 | + - "flake8 ." |
| 19 | + - "isort --check-only --diff ." |
| 20 | + - "pydocstyle ." |
| 21 | + runs-on: ubuntu-latest |
| 22 | + steps: |
| 23 | + - uses: actions/setup-python@v2.2.2 |
| 24 | + - uses: actions/checkout@v2.3.4 |
| 25 | + - uses: actions/cache@v2.1.6 |
| 26 | + with: |
| 27 | + path: ~/.cache/pip |
| 28 | + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} |
| 29 | + restore-keys: | |
| 30 | + ${{ runner.os }}-pip- |
| 31 | + - run: python -m pip install -r requirements.txt |
| 32 | + - run: ${{ matrix.lint-command }} |
| 33 | + |
| 34 | + dist: |
| 35 | + runs-on: ubuntu-latest |
| 36 | + steps: |
| 37 | + - run: sudo apt install -y gettext |
| 38 | + - uses: actions/setup-python@v2.2.2 |
| 39 | + - uses: actions/setup-node@v2.4.0 |
| 40 | + - uses: actions/checkout@v2.3.4 |
| 41 | + - name: Install Python dependencies |
| 42 | + run: python -m pip install --upgrade pip setuptools wheel twine readme-renderer |
| 43 | + - run: python setup.py sdist bdist_wheel |
| 44 | + - run: python -m twine check dist/* |
| 45 | + - uses: actions/upload-artifact@v2 |
| 46 | + with: |
| 47 | + path: dist/* |
| 48 | + |
11 | 49 | docs:
|
12 | 50 | runs-on: ubuntu-latest
|
13 | 51 | steps:
|
|
19 | 57 | - run: python setup.py build_sphinx -W
|
20 | 58 |
|
21 | 59 | SQLite:
|
22 | | - needs: [docs] |
| 60 | + needs: [lint, dist, docs] |
23 | 61 | runs-on: ubuntu-latest
|
24 | 62 | strategy:
|
25 | 63 | matrix:
|
|
41 | 79 | codecov
|
42 | 80 |
|
43 | 81 | extras:
|
44 | | - needs: [docs] |
| 82 | + needs: [lint, dist, docs] |
45 | 83 | runs-on: ubuntu-latest
|
46 | 84 | strategy:
|
47 | 85 | matrix:
|
|
64 | 102 |
|
65 | 103 |
|
66 | 104 | PostgreSQL:
|
67 | | - needs: [docs] |
| 105 | + needs: [lint, dist, docs] |
68 | 106 | runs-on: ubuntu-latest
|
69 | 107 | strategy:
|
70 | 108 | matrix:
|
|
0 commit comments