mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-04-19 14:10:14 +00:00
CI: build and test on Debian unstable, then several stable releases relevant to our users
stable releases currently include bullseye + buster + stretch; would be nice if we could add Fedora or Gentoo or Arch ...
This commit is contained in:
parent
8239519ca3
commit
d6c1c87fc6
155
.gitlab-ci.yml
155
.gitlab-ci.yml
@ -1,11 +1,15 @@
|
||||
image: php:apache-buster
|
||||
stages:
|
||||
- build
|
||||
- test
|
||||
- testall
|
||||
|
||||
build:
|
||||
stage: build
|
||||
image: debian:unstable
|
||||
script:
|
||||
- apt-get -y update
|
||||
- bash -c 'mkdir -p /usr/share/man/man{0..10}'
|
||||
- apt-get -y install build-essential devscripts fakeroot dh-exec jdupes rst2pdf doxygen graphviz # todo build-dep instead, change this task's image to plain debian
|
||||
- apt-get -y install build-essential devscripts fakeroot dh-exec jdupes doxygen graphviz php-cli
|
||||
- mv debian/changelog debian/changelog.old
|
||||
- >
|
||||
cat
|
||||
@ -26,6 +30,103 @@ build:
|
||||
|
||||
test:
|
||||
stage: test
|
||||
image: debian:unstable
|
||||
artifacts:
|
||||
paths:
|
||||
- testing/report.xml
|
||||
- apache2_log/*
|
||||
reports:
|
||||
junit: testing/report.xml
|
||||
when:
|
||||
always
|
||||
script:
|
||||
- apt-get -y update
|
||||
- bash -c 'mkdir -p /usr/share/man/man{0..10}'
|
||||
- apt-get -y install locales
|
||||
- echo "en_NZ.UTF-8 UTF-8" >> /etc/locale.gen
|
||||
- locale-gen
|
||||
- echo "LANG=en_NZ.UTF-8" > /etc/default/locale
|
||||
- apt-get -y install libdbd-pg-perl libyaml-perl php php-cli php-pgsql php-xml postgresql-client postgresql libapache2-mod-php curl xmlstarlet
|
||||
- curl 'https://gitlab.com/davical-project/awl/-/archive/master/awl-master.tar.gz' | tar zxf -
|
||||
- mv awl-master /usr/share/awl/
|
||||
- chown -R www-data /usr/share/awl/
|
||||
- dpkg --ignore-depends=libawl-php -i *.deb
|
||||
- echo '127.0.1.1 regression mycaldav myempty' >> /etc/hosts
|
||||
- rm /etc/apache2/ports.conf /etc/apache2/sites-enabled/000-default.conf && touch /etc/apache2/ports.conf
|
||||
- cp testing/apache-site.conf.example /etc/apache2/sites-enabled/davical-regression.conf
|
||||
- sed -i 's/\/path\/to/\/usr\/share/g' /etc/apache2/sites-enabled/davical-regression.conf
|
||||
- mkdir /usr/share/davical/testing/
|
||||
- cp testing/*.php /usr/share/davical/testing/
|
||||
- rm /etc/davical/config.php
|
||||
- cp testing/regression-conf.php.example /etc/davical/regression-conf.php
|
||||
- ln -s /etc/davical/regression-conf.php /etc/davical/mycaldav-conf.php
|
||||
- ln -s /etc/davical/regression-conf.php /etc/davical/myempty-conf.php
|
||||
- sed -i '/peer/d' /etc/postgresql/13/main/pg_hba.conf
|
||||
- echo 'local all all trust' >> /etc/postgresql/13/main/pg_hba.conf
|
||||
- pg_ctlcluster 13 main start
|
||||
- su postgres -c 'createuser davical_dba --createdb --createrole --superuser'
|
||||
- su postgres -c 'createuser davical_app --superuser'
|
||||
- su postgres -c 'createuser testrunner --superuser'
|
||||
- pg_ctlcluster 13 main restart
|
||||
- a2enmod rewrite
|
||||
- apache2ctl start
|
||||
- useradd testrunner
|
||||
- cd testing && su testrunner -c 'IS_CI=yes ALLSUITES="regression-suite binding carddav scheduling" ./run_regressions.sh all x'
|
||||
after_script:
|
||||
- cp -r /var/log/apache2 apache2_log
|
||||
|
||||
|
||||
test_bullseye:
|
||||
stage: testall
|
||||
image: debian:bullseye
|
||||
artifacts:
|
||||
paths:
|
||||
- testing/report.xml
|
||||
- apache2_log/*
|
||||
reports:
|
||||
junit: testing/report.xml
|
||||
when:
|
||||
always
|
||||
script:
|
||||
- apt-get -y update
|
||||
- bash -c 'mkdir -p /usr/share/man/man{0..10}'
|
||||
- apt-get -y install locales
|
||||
- echo "en_NZ.UTF-8 UTF-8" >> /etc/locale.gen
|
||||
- locale-gen
|
||||
- echo "LANG=en_NZ.UTF-8" > /etc/default/locale
|
||||
- apt-get -y install libdbd-pg-perl libyaml-perl php php-cli php-pgsql php-xml postgresql-client postgresql libapache2-mod-php curl xmlstarlet
|
||||
- curl 'https://gitlab.com/davical-project/awl/-/archive/master/awl-master.tar.gz' | tar zxf -
|
||||
- mv awl-master /usr/share/awl/
|
||||
- chown -R www-data /usr/share/awl/
|
||||
- dpkg --ignore-depends=libawl-php -i *.deb
|
||||
- echo '127.0.1.1 regression mycaldav myempty' >> /etc/hosts
|
||||
- rm /etc/apache2/ports.conf /etc/apache2/sites-enabled/000-default.conf && touch /etc/apache2/ports.conf
|
||||
- cp testing/apache-site.conf.example /etc/apache2/sites-enabled/davical-regression.conf
|
||||
- sed -i 's/\/path\/to/\/usr\/share/g' /etc/apache2/sites-enabled/davical-regression.conf
|
||||
- mkdir /usr/share/davical/testing/
|
||||
- cp testing/*.php /usr/share/davical/testing/
|
||||
- rm /etc/davical/config.php
|
||||
- cp testing/regression-conf.php.example /etc/davical/regression-conf.php
|
||||
- ln -s /etc/davical/regression-conf.php /etc/davical/mycaldav-conf.php
|
||||
- ln -s /etc/davical/regression-conf.php /etc/davical/myempty-conf.php
|
||||
- sed -i '/peer/d' /etc/postgresql/13/main/pg_hba.conf
|
||||
- echo 'local all all trust' >> /etc/postgresql/13/main/pg_hba.conf
|
||||
- pg_ctlcluster 13 main start
|
||||
- su postgres -c 'createuser davical_dba --createdb --createrole --superuser'
|
||||
- su postgres -c 'createuser davical_app --superuser'
|
||||
- su postgres -c 'createuser testrunner --superuser'
|
||||
- pg_ctlcluster 13 main restart
|
||||
- a2enmod rewrite
|
||||
- apache2ctl start
|
||||
- useradd testrunner
|
||||
- cd testing && su testrunner -c 'IS_CI=yes ALLSUITES="regression-suite binding carddav scheduling" ./run_regressions.sh all x'
|
||||
after_script:
|
||||
- cp -r /var/log/apache2 apache2_log
|
||||
|
||||
|
||||
test_buster:
|
||||
stage: testall
|
||||
image: php:apache-buster
|
||||
artifacts:
|
||||
paths:
|
||||
- testing/report.xml
|
||||
@ -72,3 +173,53 @@ test:
|
||||
- cd testing && su testrunner -c 'IS_CI=yes ALLSUITES="regression-suite binding carddav scheduling" ./run_regressions.sh all x'
|
||||
after_script:
|
||||
- cp -r /var/log/apache2 apache2_log
|
||||
|
||||
|
||||
test_stretch:
|
||||
stage: testall
|
||||
image: php:apache-stretch
|
||||
artifacts:
|
||||
paths:
|
||||
- testing/report.xml
|
||||
- apache2_log/*
|
||||
reports:
|
||||
junit: testing/report.xml
|
||||
when:
|
||||
always
|
||||
script:
|
||||
- apt-get -y update
|
||||
- bash -c 'mkdir -p /usr/share/man/man{0..10}'
|
||||
- apt-get -y install locales
|
||||
- echo "en_NZ.UTF-8 UTF-8" >> /etc/locale.gen
|
||||
- locale-gen
|
||||
- echo "LANG=en_NZ.UTF-8" > /etc/default/locale
|
||||
- apt-get -y install libdbd-pg-perl libyaml-perl perl postgresql postgresql-client libpq-dev xmlstarlet
|
||||
- curl 'https://gitlab.com/davical-project/awl/-/archive/master/awl-master.tar.gz' | tar zxf -
|
||||
- mv awl-master /usr/share/awl/
|
||||
- chown -R www-data /usr/share/awl/
|
||||
- dpkg --ignore-depends=php,php-pgsql,php-xml,libawl-php,php-cli -i *.deb
|
||||
- docker-php-ext-install -j$(nproc) pgsql
|
||||
- docker-php-ext-install -j$(nproc) pdo_pgsql
|
||||
- docker-php-ext-install -j$(nproc) calendar
|
||||
- echo '127.0.1.1 regression mycaldav myempty' >> /etc/hosts
|
||||
- cp testing/apache-site.conf.example /etc/apache2/sites-enabled/davical-regression.conf
|
||||
- sed -i 's/\/path\/to/\/usr\/share/g' /etc/apache2/sites-enabled/davical-regression.conf
|
||||
- mkdir /usr/share/davical/testing/
|
||||
- cp testing/*.php /usr/share/davical/testing/
|
||||
- rm /etc/davical/config.php
|
||||
- cp testing/regression-conf.php.example /etc/davical/regression-conf.php
|
||||
- ln -s /etc/davical/regression-conf.php /etc/davical/mycaldav-conf.php
|
||||
- ln -s /etc/davical/regression-conf.php /etc/davical/myempty-conf.php
|
||||
- sed -i '/peer/d' /etc/postgresql/9.6/main/pg_hba.conf
|
||||
- echo 'local all all trust' >> /etc/postgresql/9.6/main/pg_hba.conf
|
||||
- pg_ctlcluster 9.6 main start
|
||||
- su postgres -c 'createuser davical_dba --createdb --createrole --superuser'
|
||||
- su postgres -c 'createuser davical_app --superuser'
|
||||
- su postgres -c 'createuser testrunner --superuser'
|
||||
- pg_ctlcluster 9.6 main restart
|
||||
- a2enmod rewrite
|
||||
- apache2ctl start
|
||||
- useradd testrunner
|
||||
- cd testing && su testrunner -c 'IS_CI=yes ALLSUITES="regression-suite binding carddav scheduling" ./run_regressions.sh all x'
|
||||
after_script:
|
||||
- cp -r /var/log/apache2 apache2_log
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user