|
| 1 | +name: Code Style |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ main ] |
| 6 | + paths-ignore: |
| 7 | + - 'pretalx_venueless/locale/**' |
| 8 | + - 'pretalx_venueless/static/**' |
| 9 | + pull_request: |
| 10 | + branches: [ main ] |
| 11 | + paths-ignore: |
| 12 | + - 'pretalx_venueless/locale/**' |
| 13 | + - 'pretalx_venueless/static/**' |
| 14 | + |
| 15 | + |
| 16 | +jobs: |
| 17 | + isort: |
| 18 | + name: isort |
| 19 | + runs-on: ubuntu-latest |
| 20 | + steps: |
| 21 | + - uses: actions/checkout@v2 |
| 22 | + - name: Set up Python 3.11 |
| 23 | + uses: actions/setup-python@v1 |
| 24 | + with: |
| 25 | + cache: "pip" |
| 26 | + python-version: "3.11" |
| 27 | + - name: Install isort |
| 28 | + run: pip3 install isort |
| 29 | + - name: Run isort |
| 30 | + run: isort -c . |
| 31 | + flake: |
| 32 | + name: flake8 |
| 33 | + runs-on: ubuntu-latest |
| 34 | + steps: |
| 35 | + - uses: actions/checkout@v2 |
| 36 | + - name: Set up Python 3.11 |
| 37 | + uses: actions/setup-python@v1 |
| 38 | + with: |
| 39 | + cache: "pip" |
| 40 | + python-version: "3.11" |
| 41 | + - name: Install Dependencies |
| 42 | + run: pip3 install flake8 flake8-bugbear |
| 43 | + - name: Run flake8 |
| 44 | + run: flake8 . |
| 45 | + working-directory: . |
| 46 | + black: |
| 47 | + name: black |
| 48 | + runs-on: ubuntu-latest |
| 49 | + steps: |
| 50 | + - uses: actions/checkout@v2 |
| 51 | + - name: Set up Python 3.11 |
| 52 | + uses: actions/setup-python@v1 |
| 53 | + with: |
| 54 | + cache: "pip" |
| 55 | + python-version: "3.11" |
| 56 | + - name: Install Dependencies |
| 57 | + run: pip3 install black |
| 58 | + - name: Run black |
| 59 | + run: black --check . |
| 60 | + working-directory: . |
| 61 | + djhtml: |
| 62 | + name: djhtml |
| 63 | + runs-on: ubuntu-latest |
| 64 | + steps: |
| 65 | + - uses: actions/checkout@v2 |
| 66 | + - name: Set up Python 3.11 |
| 67 | + uses: actions/setup-python@v1 |
| 68 | + with: |
| 69 | + cache: "pip" |
| 70 | + python-version: "3.11" |
| 71 | + - name: Install Dependencies |
| 72 | + run: pip3 install djhtml |
| 73 | + - name: Run docformatter |
| 74 | + run: find -name "*.html" | xargs djhtml -c |
| 75 | + working-directory: . |
| 76 | + packaging: |
| 77 | + name: packaging |
| 78 | + runs-on: ubuntu-latest |
| 79 | + steps: |
| 80 | + - uses: actions/checkout@v2 |
| 81 | + - name: Set up Python 3.11 |
| 82 | + uses: actions/setup-python@v1 |
| 83 | + with: |
| 84 | + cache: "pip" |
| 85 | + python-version: "3.11" |
| 86 | + - name: Install Dependencies |
| 87 | + run: pip3 install twine check-manifest -Ue . |
| 88 | + - name: Run check-manifest |
| 89 | + run: check-manifest . |
| 90 | + working-directory: . |
| 91 | + - name: Build package |
| 92 | + run: python -m build |
| 93 | + working-directory: . |
| 94 | + - name: Check package |
| 95 | + run: twine check dist/* |
| 96 | + working-directory: . |
0 commit comments