Calendar: add FT sprint
[tails/test.git] / .gitlab-ci.yml
bloba8f007fffb29406fe1f99493c93b8d0abf018259
1 workflow:
2   rules:
3     - if: $CI_MERGE_REQUEST_IID
4     - if: $CI_COMMIT_TAG
5     - if: '$CI_COMMIT_BRANCH =~ /^master|stable|testing|devel$/'
7 image: debian:buster
9 before_script:
10   - export DEBIAN_FRONTEND=noninteractive
11   - apt-get update -qq
13 .prepare-lint-po: &prepare-lint-po
14   - apt-get -qy install git i18nspector
15   - git clone https://gitlab.tails.boum.org/tails/jenkins-tools.git /tmp/jenkins-tools
17 lint-po:
18   image: debian:testing
19   rules:
20     - if: '$CI_COMMIT_BRANCH =~ /^master|stable|testing|devel$/'
21     - changes:
22         - ./**.po
23   script:
24     - *prepare-lint-po
25     - /tmp/jenkins-tools/slaves/lint_po
27 lint-latest-po:
28   image: debian:testing
29   rules:
30     - if: '$CI_COMMIT_BRANCH == "stable"'
31   script:
32     - *prepare-lint-po
33     - apt-get -qy install intltool
34     - ./import-translations
35     - /tmp/jenkins-tools/slaves/lint_po po/*.po
37 check-po-msgfmt:
38   rules:
39     - if: '$CI_COMMIT_BRANCH =~ /^master|stable|testing|devel$/'
40     - changes:
41         - ./**.po
42   script:
43     - apt-get -qy install python3 gettext
44     - ./bin/check-po-msgfmt
46 check-po-meta-date:
47   rules:
48     - if: '$CI_COMMIT_BRANCH =~ /^master|stable|testing|devel$/'
49     - changes:
50         - ./**.po
51   script:
52     - apt-get -qy install git ruby
53     - ./bin/sanity-check-website
55 check-translatable-live-website-urls:
56   script:
57     - apt-get -qy install python3-polib
58     - ./bin/check-translatable-live-website-urls po/tails.pot
60 test-iuk:
61   script:
62   - 'cat config/chroot_local-packageslists/tails-perl5lib.list
63          config/chroot_local-packageslists/tails-iuk.list
64        | grep -E -v "^#"
65        | xargs apt-get -qy install'
66   - 'apt-get -qy install
67        apt-file
68        libdist-zilla-plugin-test-notabs-perl
69        libdist-zilla-plugin-test-perl-critic-perl
70        libdist-zilla-app-command-authordebs-perl
71        libmodule-build-perl
72        sudo
73        attr
74        bsdtar
75        libdevice-cdio-perl
76        faketime
77        genisoimage
78        gnutls-bin
79        libdata-dumper-concise-perl
80        libdatetime-perl
81        libfile-copy-recursive-perl'
82   - apt-get update -qq # Take into account APT configuration added by apt-file
83   # Otherwise, apt-get called by "dzil authordebs --install" asks confirmation
84   - echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/yes
85   - cd $CI_PROJECT_DIR/config/chroot_local-includes/usr/src/iuk
86   - dzil authordebs --install
87   - export SOURCE_DATE_EPOCH=$(date --utc +%s)
88   - 'TAILS_GIT_CHECKOUT=$CI_PROJECT_DIR
89      NODE_PATH=$CI_PROJECT_DIR/submodules/mirror-pool-dispatcher/lib/js
90      PATH=$CI_PROJECT_DIR/submodules/mirror-pool-dispatcher/bin:$PATH
91      PERL5LIB=$CI_PROJECT_DIR/config/chroot_local-includes/usr/src/perl5lib/lib
92      LC_ALL=C.UTF-8
93      dzil test --all'
95 test-perl5lib:
96   script:
97   - 'cat config/chroot_local-packageslists/tails-perl5lib.list
98        | grep -E -v "^#"
99        | xargs apt-get -qy install'
100   - 'apt-get -qy install
101        apt-file
102        libdist-zilla-plugin-test-notabs-perl
103        libdist-zilla-plugin-test-perl-critic-perl
104        libdist-zilla-app-command-authordebs-perl
105        libmodule-build-perl
106        sudo'
107   - apt-get update -qq # Take into account APT configuration added by apt-file
108   # Otherwise, apt-get called by "dzil authordebs --install" asks confirmation
109   - echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/yes
110   - cd $CI_PROJECT_DIR/config/chroot_local-includes/usr/src/perl5lib
111   - dzil authordebs --install
112   - dzil test --all
114 test-persistence-setup:
115   script:
116   - apt-get -qy install apt-file
117   - 'echo "deb http://deb.debian.org/debian buster-backports main"
118        > /etc/apt/sources.list.d/buster-backports.list'
119   - 'echo "deb http://deb.debian.org/debian bullseye main"
120        > /etc/apt/sources.list.d/bullseye.list'
121   # Needs to be kept in sync' with config/chroot_apt/preferences
122   - |
123     cat > /etc/apt/preferences.d/electrum.pref <<-'EOF'
124     Explanation: unavailable in Buster
125     Package: electrum python3-electrum python3-aiohttp-socks python3-aiorpcx python3-ecdsa
126     Pin: release o=Debian,n=bullseye
127     Pin-Priority: 999
129     Explanation: Electrum needs a version newer than the one in Buster
130     Package: python3-attr python3-protobuf libprotobuf23
131     Pin: release o=Debian Backports,n=buster-backports
132     Pin-Priority: 990
134     Explanation: Electrum 4.0.2 and recent TREZOR firmware need 0.12
135     Package: python3-trezor trezor
136     Pin: release o=Debian Backports,n=buster-backports
137     Pin-Priority: 999
139     Package: *
140     Pin: release o=Debian,n=bullseye
141     Pin-Priority: -10
142     EOF
143   - apt-get update -qq
144   - 'cat config/chroot_local-packageslists/tails-perl5lib.list
145          config/chroot_local-packageslists/tails-persistence-setup.list
146        | grep -E -v "^#"
147        | xargs apt-get -qy install'
148   - 'apt-get -qy install
149        libdist-zilla-plugin-test-notabs-perl
150        libdist-zilla-plugin-test-perl-critic-perl
151        libdist-zilla-app-command-authordebs-perl
152        libmodule-build-perl
153        libtest-most-perl
154        libtest-spec-perl
155        libtest-bdd-cucumber-perl
156        liblwp-online-perl
157        libdata-dumper-concise-perl
158        libtest-fatal-perl
159        libsys-statistics-linux-perl
160        sudo
161        xvfb'
162   # Otherwise, apt-get called by "dzil authordebs --install" asks confirmation
163   - echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/yes
164   - cd $CI_PROJECT_DIR/config/chroot_local-includes/usr/src/perl5lib
165   - dzil authordebs --install
166   - cd $CI_PROJECT_DIR/config/chroot_local-includes/usr/src/persistence-setup
167   - dzil authordebs --install
168   - >
169     PERL5LIB=$CI_PROJECT_DIR/config/chroot_local-includes/usr/src/perl5lib/lib
170     TAILS_GIT_CHECKOUT=$CI_PROJECT_DIR
171     LC_ALL=C.UTF-8
172     xvfb-run --auto-servernum dzil test --all
174 test-python-doctest:
175   script:
176     - apt-get -qy install python3
177     - config/chroot_local-includes/usr/local/lib/tails-gdm-error-message doctest --verbose
179 test-whisperback:
180   script:
181     - 'cat config/chroot_local-packageslists/whisperback.list | grep -E -v "^#"
182          | xargs apt-get -qy install'
183     - apt-get -qy install python3-pytest
184     - 'PYTHONPATH=config/chroot_local-includes/usr/lib/python3/dist-packages
185          pytest-3 --verbose --junit-xml=report.xml
186          config/chroot_local-includes/usr/lib/python3/dist-packages/whisperBack/test.py'
187   artifacts:
188     when: always
189     reports:
190       junit: report.xml
192 apt-snapshots-expiry:
193   script:
194     - apt-get -qy install curl git
195     - ./bin/apt-snapshots-expiry
196   rules:
197     - if: '$CI_COMMIT_BRANCH =~ /^stable|testing|devel$/'
198     - changes:
199         - config/APT_snapshots.d/*/serial
200         - vagrant/definitions/tails-builder/config/APT_snapshots.d/*/serial