| 1 | name: CI/CD Pipeline |
| 2 | |
| 3 | on: |
| 4 | - push |
| 5 | - pull_request |
| 6 | |
| 7 | jobs: |
| 8 | test: |
| 9 | name: Test Python ${{ matrix.python-version }} on ${{ matrix.os }} |
| 10 | runs-on: ${{ matrix.os }} |
| 11 | |
| 12 | strategy: |
| 13 | fail-fast: false |
| 14 | matrix: |
| 15 | os: |
| 16 | - ubuntu-latest |
| 17 | - macos-latest |
| 18 | - windows-latest |
| 19 | python-version: |
| 20 | - "3.9" |
| 21 | - "3.10" |
| 22 | - "3.11" |
| 23 | - "3.12" |
| 24 | |
| 25 | steps: |
| 26 | - uses: actions/checkout@v4 |
| 27 | |
| 28 | - name: Set up Python ${{ matrix.python-version }} |
| 29 | uses: actions/setup-python@v5 |
| 30 | with: |
| 31 | python-version: ${{ matrix.python-version }} |
| 32 | |
| 33 | - run: | |
| 34 | # ensure we're using *our* dotenv during testing and not some other one |
| 35 | # installed on the system, e.g. gh machines apparently have sometimes |
| 36 | # the ruby dotenv package installed |
| 37 | pip install --upgrade -r requirements-dev.txt |
| 38 | pip install -e .['dev'] |
| 39 | make test |
| 40 | |
| 41 | lint: |
| 42 | runs-on: ubuntu-latest |
| 43 | |
| 44 | steps: |
| 45 | - uses: actions/checkout@v4 |
| 46 | - uses: actions/setup-python@v5 |
| 47 | with: |
| 48 | python-version: "3.x" |
| 49 | |
| 50 | - run: | |
| 51 | make lint |
| 52 | |
| 53 | mypy: |
| 54 | runs-on: ubuntu-latest |
| 55 | |
| 56 | steps: |
| 57 | - uses: actions/checkout@v4 |
| 58 | - uses: actions/setup-python@v5 |
| 59 | with: |
| 60 | python-version: "3.x" |
| 61 | |
| 62 | - run: | |
| 63 | make mypy |
| 64 | |
| 65 | test-release: |
| 66 | runs-on: ubuntu-latest |
| 67 | |
| 68 | steps: |
| 69 | - uses: actions/checkout@v4 |
| 70 | - uses: actions/setup-python@v5 |
| 71 | with: |
| 72 | python-version: "3.x" |
| 73 | |
| 74 | - run: | |
| 75 | make test-release |