File: test.yml

package info (click to toggle)
django-rq 3.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 708 kB
  • sloc: python: 3,598; makefile: 7
file content (77 lines) | stat: -rw-r--r-- 2,006 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
75
76
77
name: Test

on:
  push:
    branches: [master]
  pull_request:
    branches: [master]

permissions:
  contents: read # to fetch code (actions/checkout)

jobs:
  build:
    runs-on: ubuntu-latest
    name: Python${{ matrix.python-version }}/Django${{ matrix.django-version }}
    strategy:
      matrix:
        python-version: ["3.10", "3.11", "3.12", "3.13"]
        django-version: ["4.2", "5.0", "5.1", "5.2"]

    steps:
      - uses: actions/checkout@v3

      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v4.2.0
        with:
          python-version: ${{ matrix.python-version }}

      - name: Start Redis
        uses: supercharge/redis-github-action@1.4.0

      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install django==${{ matrix.django-version }} \
            redis django-redis pyyaml rq sentry-sdk

      - name: Run Test
        run: |
          `which django-admin` test tests --settings=tests.settings --pythonpath=. -v2

      - name: Install optional dependencies
        run: |
          pip install prometheus_client

      - name: Run Test with optional dependencies
        run: |
          `which django-admin` test tests --settings=tests.settings --pythonpath=. -v2

  mypy:
    runs-on: ubuntu-latest
    name: Type check

    steps:
      - uses: actions/checkout@v3

      - name: Set up Python 3.13
        uses: actions/setup-python@v4.2.0
        with:
          python-version: "3.13"

      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install django-stubs[compatible-mypy] rq types-redis

      - name: Run mypy
        continue-on-error: true
        id: mypy
        run: |
          mypy django_rq

      - name: Set Status
        if: steps.mypy.outcome == 'failure'
        run: |
          echo "Mypy found errors, marking check as neutral"
          exit 78  # Exit code 78 results in a neutral check