| 1 | name: Test Django Simple Captcha |
| 2 | |
| 3 | on: [push, pull_request] |
| 4 | |
| 5 | jobs: |
| 6 | test: |
| 7 | runs-on: ubuntu-latest |
| 8 | strategy: |
| 9 | max-parallel: 4 |
| 10 | matrix: |
| 11 | python-version: ["3.13"] |
| 12 | |
| 13 | steps: |
| 14 | - uses: actions/checkout@v4 |
| 15 | - name: Set up Python ${{ matrix.python-version }} |
| 16 | uses: actions/setup-python@v5 |
| 17 | with: |
| 18 | python-version: ${{ matrix.python-version }} |
| 19 | - name: Install dependencies |
| 20 | run: | |
| 21 | sudo apt-get install gettext |
| 22 | python -m pip install --upgrade pip wheel |
| 23 | pip install tox tox-gh-actions |
| 24 | - name: Test with tox |
| 25 | run: tox |
| 26 | |
| 27 | windows: |
| 28 | runs-on: windows-latest |
| 29 | strategy: |
| 30 | matrix: |
| 31 | python-version: |
| 32 | - '3.12' |
| 33 | steps: |
| 34 | - name: Checkout |
| 35 | uses: actions/checkout@v4 |
| 36 | - name: Set up Python |
| 37 | uses: actions/setup-python@v5 |
| 38 | with: |
| 39 | python-version: ${{ matrix.python-version }} |
| 40 | - name: Install and upgrade packaging tools |
| 41 | run: python -m pip install --upgrade pip setuptools wheel |
| 42 | - run: python -m pip install tox tox-gh-actions |
| 43 | - name: Run tests |
| 44 | run: tox -e py313-django60 |
| 45 | |
| 46 | docs: |
| 47 | runs-on: ubuntu-latest |
| 48 | strategy: |
| 49 | max-parallel: 4 |
| 50 | matrix: |
| 51 | python-version: |
| 52 | - '3.12' |
| 53 | steps: |
| 54 | - name: Checkout |
| 55 | uses: actions/checkout@v4 |
| 56 | - name: Set up Python |
| 57 | uses: actions/setup-python@v5 |
| 58 | with: |
| 59 | python-version: ${{ matrix.python-version }} |
| 60 | - name: Install and upgrade packaging tools |
| 61 | run: python -m pip install --upgrade pip setuptools wheel |
| 62 | - run: python -m pip install tox tox-gh-actions |
| 63 | - name: Run tests |
| 64 | run: tox -e docs |
| 65 | |
| 66 | coverage: |
| 67 | runs-on: ubuntu-latest |
| 68 | strategy: |
| 69 | max-parallel: 4 |
| 70 | matrix: |
| 71 | python-version: |
| 72 | - '3.12' |
| 73 | steps: |
| 74 | - name: Checkout |
| 75 | uses: actions/checkout@v4 |
| 76 | - name: Set up Python |
| 77 | uses: actions/setup-python@v5 |
| 78 | with: |
| 79 | python-version: ${{ matrix.python-version }} |
| 80 | - name: Install audio dependencies |
| 81 | run: sudo apt-get install sox flite |
| 82 | - name: Install and upgrade packaging tools |
| 83 | run: python -m pip install --upgrade pip setuptools wheel |
| 84 | - run: python -m pip install tox tox-gh-actions |
| 85 | - name: Run tests |
| 86 | run: tox -e coverage |
| 87 | env: |
| 88 | CAPTCHA_FLITE_PATH: '/usr/bin/flite' |
| 89 | CAPTCHA_SOX_PATH: '/usr/bin/sox' |
| 90 | |
| 91 | gettext: |
| 92 | runs-on: ubuntu-latest |
| 93 | strategy: |
| 94 | max-parallel: 4 |
| 95 | matrix: |
| 96 | python-version: |
| 97 | - '3.12' |
| 98 | steps: |
| 99 | - name: Checkout |
| 100 | uses: actions/checkout@v4 |
| 101 | - name: Set up Python |
| 102 | uses: actions/setup-python@v5 |
| 103 | with: |
| 104 | python-version: ${{ matrix.python-version }} |
| 105 | - name: Install dependencies |
| 106 | run: sudo apt-get install gettext |
| 107 | - name: Install and upgrade packaging tools |
| 108 | run: python -m pip install --upgrade pip setuptools wheel |
| 109 | - run: python -m pip install tox tox-gh-actions |
| 110 | - name: Run tests |
| 111 | run: tox -e gettext |
| 112 | |
| 113 | flake8: |
| 114 | runs-on: ubuntu-latest |
| 115 | strategy: |
| 116 | max-parallel: 4 |
| 117 | matrix: |
| 118 | python-version: |
| 119 | - '3.12' |
| 120 | steps: |
| 121 | - name: Checkout |
| 122 | uses: actions/checkout@v4 |
| 123 | - name: Set up Python |
| 124 | uses: actions/setup-python@v5 |
| 125 | with: |
| 126 | python-version: ${{ matrix.python-version }} |
| 127 | - name: Install and upgrade packaging tools |
| 128 | run: python -m pip install --upgrade pip setuptools wheel |
| 129 | - run: python -m pip install tox tox-gh-actions |
| 130 | - name: Run tests |
| 131 | run: tox -e flake8 |