| 1 | name: CI |
| 2 | |
| 3 | on: |
| 4 | - push |
| 5 | - pull_request |
| 6 | |
| 7 | jobs: |
| 8 | lint: |
| 9 | name: Lint |
| 10 | runs-on: ubuntu-latest |
| 11 | |
| 12 | steps: |
| 13 | - uses: actions/checkout@v4 |
| 14 | |
| 15 | - name: Set up Python |
| 16 | uses: actions/setup-python@v5 |
| 17 | with: |
| 18 | python-version: 3.x |
| 19 | |
| 20 | - name: Install tox |
| 21 | run: python -m pip install tox |
| 22 | |
| 23 | - name: Run tox |
| 24 | run: tox -e lint |
| 25 | |
| 26 | test: |
| 27 | name: Python ${{ matrix.python }} |
| 28 | runs-on: ${{ matrix.os }} |
| 29 | |
| 30 | strategy: |
| 31 | matrix: |
| 32 | os: |
| 33 | - "ubuntu-latest" |
| 34 | python: |
| 35 | - "3.7" |
| 36 | - "3.8" |
| 37 | - "3.9" |
| 38 | - "3.10" |
| 39 | - "3.11" |
| 40 | - "3.12" |
| 41 | include: |
| 42 | - os: "ubuntu-20.04" |
| 43 | python: "3.6" |
| 44 | - os: "ubuntu-20.04" |
| 45 | python: "pypy-3.6" |
| 46 | - os: "ubuntu-22.04" |
| 47 | python: "pypy-3.10" |
| 48 | - os: "macos-12" |
| 49 | python: 3.12 |
| 50 | |
| 51 | steps: |
| 52 | - uses: actions/checkout@v4 |
| 53 | |
| 54 | - name: Set up Python ${{ matrix.python }} |
| 55 | uses: actions/setup-python@v5 |
| 56 | with: |
| 57 | python-version: ${{ matrix.python }} |
| 58 | |
| 59 | - name: Install tox |
| 60 | run: python -m pip install tox |
| 61 | |
| 62 | - name: Run tox |
| 63 | run: tox -e py |
| 64 | |
| 65 | - name: Upload coverage to Codecov |
| 66 | uses: codecov/codecov-action@v3 |
| 67 | with: |
| 68 | files: .coverage |
| 69 | |
| 70 | windows: |
| 71 | name: Windows |
| 72 | runs-on: windows-latest |
| 73 | |
| 74 | steps: |
| 75 | - uses: actions/checkout@v4 |
| 76 | |
| 77 | - uses: codecov/codecov-action@v3 |
| 78 | |
| 79 | - name: Set up Python |
| 80 | uses: actions/setup-python@v5 |
| 81 | with: |
| 82 | python-version: 3.x |
| 83 | |
| 84 | - name: Install tox |
| 85 | run: python -m pip install tox |
| 86 | |
| 87 | - name: Run tox |
| 88 | run: tox -e py |