File: test.yml

package info (click to toggle)
dj-database-url 3.1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 364 kB
  • sloc: python: 723; makefile: 3
file content (74 lines) | stat: -rw-r--r-- 1,931 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: test
on: [push, pull_request]
jobs:
  formatting:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6

      - name: Install uv
        uses: astral-sh/setup-uv@v7
        with:
          python-version: "3.12"

      - name: Run ruff
        run: uvx ruff check


  typecheck:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6

      - name: Install uv
        uses: astral-sh/setup-uv@v7
        with:
          python-version: "3.12"

      - name: Run mypy
        run: uvx mypy dj_database_url

      - name: Run pyright
        run: uvx pyright dj_database_url

  test:
    runs-on: ubuntu-latest
    needs: [formatting, typecheck]
    strategy:
      fail-fast: false
      matrix:
        python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
        django-version: ["4.2", "5.2", "6.0"]
        exclude:
          # django 4.x is not compatible with python 3.13 or higher
          - python-version: "3.13"
            django-version: "4.2"
          - python-version: "3.14"
            django-version: "4.2"
          # django 6.x is not compatible with python 3.11 or lower
          - python-version: "3.10"
            django-version: "6.0"
          - python-version: "3.11"
            django-version: "6.0"

    steps:
      - uses: actions/checkout@v4

      - name: Install uv and set the Python version
        uses: astral-sh/setup-uv@v7
        with:
          python-version: ${{ matrix.python-version }}
          activate-environment: 'true'

      - name: Install dependencies
        run: |
          uv pip install "Django~=${{ matrix.django-version }}.0"

      - name: Run Tests
        run: |
          echo "$(python --version) / Django $(django-admin --version)"
          uvx coverage run --source=dj_database_url --branch -m unittest discover -v
          uvx coverage report
          uvx coverage xml

      - uses: codecov/codecov-action@v4