File: python-package.yml

package info (click to toggle)
django-reversion 6.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 888 kB
  • sloc: python: 2,893; makefile: 22; sh: 7; sql: 1
file content (76 lines) | stat: -rw-r--r-- 2,261 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
name: Python package

on: [push, pull_request]

jobs:
  build:
    runs-on: ubuntu-latest
    services:
      postgres:
        image: postgres
        env:
          POSTGRES_PASSWORD: postgres
        options: >-
          --health-cmd pg_isready
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5
        ports:
          - 5432:5432
      mysql:
        image: mysql
        env:
          MYSQL_ROOT_PASSWORD: root
          MYSQL_DATABASE: root
        options: >-
          --health-cmd "mysqladmin -uroot -proot ping"
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5
        ports:
          - 3306:3306
    env:
      PYTHONDEVMODE: 1
      DJANGO_DATABASE_HOST_POSTGRES: localhost
      DJANGO_DATABASE_USER_POSTGRES: postgres
      DJANGO_DATABASE_NAME_POSTGRES: postgres
      DJANGO_DATABASE_PASSWORD_POSTGRES: postgres
      DJANGO_DATABASE_HOST_MYSQL: 127.0.0.1
      DJANGO_DATABASE_USER_MYSQL: root
      DJANGO_DATABASE_NAME_MYSQL: root
      DJANGO_DATABASE_PASSWORD_MYSQL: root
    strategy:
      matrix:
        python-version: [3.9, '3.10', '3.11', '3.12', '3.13']
        django-version:
          - '>=5.0,<6.0'
          - '>=4.2,<5.0'
        exclude:
          - python-version: 3.9
            django-version: '>=5.0,<6.0'
          - python-version: 3.8
            django-version: '>=5.0,<6.0'
    steps:
    - uses: actions/checkout@v5
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v2
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install dependencies (Django ${{ matrix.django-version }})
      run: |
        python -m pip install --upgrade pip
        python -m pip install --pre django'${{ matrix.django-version }}'
        python -m pip install flake8 coverage sphinx sphinx_rtd_theme psycopg2 mysqlclient -e .
    - name: Lint with flake8
      run: |
        flake8
    - name: Check no missing migrations
      run: |
        tests/manage.py makemigrations --check
    - name: Test with unittest
      run: |
        coverage run tests/manage.py test tests
        coverage report
    - name: Build docs
      run: |
        (cd docs && sphinx-build -n -W . _build)