.gitlab-ci.yml 3.42 KB
Newer Older
Mattia Rizzolo's avatar
Mattia Rizzolo committed
1
2
before_script:
  - apt-get -q update
3
4
5
6
7
8
9
10
11
12
13
  - env DEBIAN_FRONTEND=noninteractive
    apt-get -q -y install --no-install-recommends
    aspcud apt-cudf
  - env DEBIAN_FRONTEND=noninteractive
    apt-get -q -y --solver aspcud
    -o Debug::pkgProblemResolver=yes
    install --no-install-recommends
    python3
    python3-setuptools
    python3-django
    python3-coverage
14
    python3-bcrypt
15
    python3-debian
16
17
18
    python3-celery
    python3-django-celery-beat
    python3-redis
19
20
    python3-fakeredis
    python3-lupa
21
    python3-debianbts
Baptiste Beauplat's avatar
Baptiste Beauplat committed
22
    python3-lxml
Baptiste Beauplat's avatar
Baptiste Beauplat committed
23
    python3-dulwich
24
25
26
27
    python3-djangorestframework
    python3-djangorestframework-extensions
    python3-django-filters
    python3-django-redis
28
    ca-certificates
29
    locales-all
30
31
32
33
    libjs-jquery
    libjs-jquery-throttle-debounce
    libjs-jquery-isonscreen
    libjs-jquery-tablesorter
34
    git
Baptiste Beauplat's avatar
Baptiste Beauplat committed
35
    gnupg
36
    iso-codes
37
38
    dpkg-dev
    debhelper
Baptiste Beauplat's avatar
Baptiste Beauplat committed
39
    cdbs
40
    devscripts
41
    lintian
42
    $ADDITIONAL_PACKAGES
Mattia Rizzolo's avatar
Mattia Rizzolo committed
43
44

.test_template: &test
45
46
  variables:
    DJANGO_SETTINGS_MODULE: 'debexpo.settings.test'
47
  script:
48
49
    - python3 setup.py develop | tee /tmp/deps.txt
    - (! grep Downloading /tmp/deps.txt)
50
    - python3 -m coverage run --branch manage.py test -v 2 --exclude-tag nntp
51
52
    - python3 -m coverage report --include='debexpo*' --omit '*/nntp.py'
    - python3 -m coverage html --include='debexpo*' --omit '*/nntp.py'
Baptiste Beauplat's avatar
Baptiste Beauplat committed
53
54
  artifacts:
    paths:
55
      - htmlcov/
Mattia Rizzolo's avatar
Mattia Rizzolo committed
56
57
58
59
60

unstable:
  <<: *test
  image: debian:unstable

61
bookworm-bpo:
62
  <<: *test
63
  image: debian:bookworm-backports
64

65
bullseye-bpo:
Mattia Rizzolo's avatar
Mattia Rizzolo committed
66
  <<: *test
67
  image: debian:bullseye-backports
68
  variables:
Mattia Rizzolo's avatar
Mattia Rizzolo committed
69
    ADDITIONAL_PACKAGES: lintian/bullseye-backports
70
    DJANGO_SETTINGS_MODULE: 'debexpo.settings.test'
Mattia Rizzolo's avatar
Mattia Rizzolo committed
71
72
73
74
75

flake8:
  image: debian:unstable-slim
  before_script:
    - apt-get -q update
76
77
    - env DEBIAN_FRONTEND=noninteractive
      apt-get -q -y install --no-install-recommends
78
      python3-flake8
Mattia Rizzolo's avatar
Mattia Rizzolo committed
79
  script:
80
    - python3 -m flake8 debexpo/ tests/
81
82

trans:
83
  image: debian:buster-backports
84
85
86
87
88
89
90
91
  allow_failure: true
  before_script:
    - apt-get -q update
    - env DEBIAN_FRONTEND=noninteractive
      apt-get -q -y install --no-install-recommends
      gettext
      python3
      python3-setuptools
92
      python3-django/buster-backports
93
      python3-debian
94
95
96
      python3-celery
      python3-django-celery-beat
      python3-redis
97
98
      python3-fakeredis
      python3-lupa
99
      python3-debianbts
Baptiste Beauplat's avatar
Baptiste Beauplat committed
100
      python3-lxml
Baptiste Beauplat's avatar
Baptiste Beauplat committed
101
      python3-dulwich
102
103
      python3-djangorestframework
      python3-djangorestframework-extensions
104
      python3-django-filters/buster-backports
105
      python3-django-redis
106
107
108
109
  script:
    - (cd debexpo && python3 ../manage.py makemessages)
    - find debexpo -name '*.po' -exec
      msgfmt -c -v --statistics '{}' -o /dev/null ';' |& tee /tmp/trans
110
    - grep -zqv , /tmp/trans
111
112

migrations:
113
  image: debian:buster-backports
114
115
116
117
118
119
120
121
  allow_failure: true
  before_script:
    - apt-get -q update
    - env DEBIAN_FRONTEND=noninteractive
      apt-get -q -y install --no-install-recommends
      gettext
      python3
      python3-setuptools
122
      python3-django/buster-backports
123
      python3-debian
124
125
126
      python3-celery
      python3-django-celery-beat
      python3-redis
127
128
      python3-fakeredis
      python3-lupa
129
      python3-debianbts
Baptiste Beauplat's avatar
Baptiste Beauplat committed
130
      python3-lxml
Baptiste Beauplat's avatar
Baptiste Beauplat committed
131
      python3-dulwich
132
133
      python3-djangorestframework
      python3-djangorestframework-extensions
134
      python3-django-filters/buster-backports
135
      python3-django-redis
136
137
  script:
    - python3 manage.py makemigrations --check