|
| 1 | +name: Code Style |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ main, master ] |
| 6 | + paths-ignore: |
| 7 | + - 'pretix_dbevent/locale/**' |
| 8 | + - 'pretix_dbevent/static/**' |
| 9 | + pull_request: |
| 10 | + branches: [ main, master ] |
| 11 | + paths-ignore: |
| 12 | + - 'pretix_dbevent/locale/**' |
| 13 | + - 'pretix_dbevent/static/**' |
| 14 | + |
| 15 | +jobs: |
| 16 | + isort: |
| 17 | + name: isort |
| 18 | + runs-on: ubuntu-latest |
| 19 | + steps: |
| 20 | + - uses: actions/checkout@v2 |
| 21 | + - name: Set up Python 3.11 |
| 22 | + uses: actions/setup-python@v1 |
| 23 | + with: |
| 24 | + python-version: 3.11 |
| 25 | + - uses: actions/cache@v4 |
| 26 | + with: |
| 27 | + path: ~/.cache/pip |
| 28 | + key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} |
| 29 | + restore-keys: | |
| 30 | + ${{ runner.os }}-pip- |
| 31 | + - name: Install pretix |
| 32 | + run: pip3 install pretix |
| 33 | + - name: Install Dependencies |
| 34 | + run: pip3 install isort -Ue . |
| 35 | + - name: Run isort |
| 36 | + run: isort -c . |
| 37 | + flake: |
| 38 | + name: flake8 |
| 39 | + runs-on: ubuntu-latest |
| 40 | + steps: |
| 41 | + - uses: actions/checkout@v2 |
| 42 | + - name: Set up Python 3.11 |
| 43 | + uses: actions/setup-python@v1 |
| 44 | + with: |
| 45 | + python-version: 3.11 |
| 46 | + - uses: actions/cache@v4 |
| 47 | + with: |
| 48 | + path: ~/.cache/pip |
| 49 | + key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} |
| 50 | + restore-keys: | |
| 51 | + ${{ runner.os }}-pip- |
| 52 | + - name: Install pretix |
| 53 | + run: pip3 install pretix |
| 54 | + - name: Install Dependencies |
| 55 | + run: pip3 install flake8 -Ue . |
| 56 | + - name: Run flake8 |
| 57 | + run: flake8 . |
| 58 | + working-directory: . |
| 59 | + black: |
| 60 | + name: black |
| 61 | + runs-on: ubuntu-latest |
| 62 | + steps: |
| 63 | + - uses: actions/checkout@v2 |
| 64 | + - name: Set up Python 3.11 |
| 65 | + uses: actions/setup-python@v1 |
| 66 | + with: |
| 67 | + python-version: 3.11 |
| 68 | + - uses: actions/cache@v4 |
| 69 | + with: |
| 70 | + path: ~/.cache/pip |
| 71 | + key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} |
| 72 | + restore-keys: | |
| 73 | + ${{ runner.os }}-pip- |
| 74 | + - name: Install pretix |
| 75 | + run: pip3 install pretix |
| 76 | + - name: Install Dependencies |
| 77 | + run: pip3 install black -Ue . |
| 78 | + - name: Run black |
| 79 | + run: black --check . |
| 80 | + working-directory: . |
| 81 | + packaging: |
| 82 | + name: packaging |
| 83 | + runs-on: ubuntu-latest |
| 84 | + steps: |
| 85 | + - uses: actions/checkout@v2 |
| 86 | + - name: Set up Python 3.11 |
| 87 | + uses: actions/setup-python@v1 |
| 88 | + with: |
| 89 | + python-version: 3.11 |
| 90 | + - uses: actions/cache@v4 |
| 91 | + with: |
| 92 | + path: ~/.cache/pip |
| 93 | + key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} |
| 94 | + restore-keys: | |
| 95 | + ${{ runner.os }}-pip- |
| 96 | + - name: Install pretix |
| 97 | + run: pip3 install pretix |
| 98 | + - name: Install Dependencies |
| 99 | + run: pip3 install twine check-manifest pretix-plugin-build setuptools build -Ue . |
| 100 | + - name: Run check-manifest |
| 101 | + run: check-manifest . |
| 102 | + working-directory: . |
| 103 | + - name: Build package |
| 104 | + run: python setup.py sdist |
| 105 | + working-directory: . |
| 106 | + - name: Check package |
| 107 | + run: twine check dist/* |
| 108 | + working-directory: . |
0 commit comments