2024-05-04 00:53:37 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
2024-05-11 09:18:32 +00:00
|
|
|
name: Ubuntu 22.04 - Unit Test & Code Coverage
|
2024-05-04 00:53:37 +00:00
|
|
|
steps:
|
2024-05-11 09:18:32 +00:00
|
|
|
- name: run & upload code coverage
|
2024-05-10 21:19:56 +00:00
|
|
|
image: ubuntu:22.04
|
|
|
|
environment:
|
2024-05-11 09:13:29 +00:00
|
|
|
CODECOV_TOKEN:
|
|
|
|
from_secret: CODECOV_TOKEN
|
|
|
|
DEBIAN_FRONTEND: noninteractive
|
2024-05-10 21:19:56 +00:00
|
|
|
commands:
|
2024-05-11 08:43:52 +00:00
|
|
|
- MAIN_REPO_DIR=$(pwd)
|
2024-05-10 21:19:56 +00:00
|
|
|
- apt-get update
|
|
|
|
- apt-get install -y libicu-dev sudo cron apt-utils -yqq daemonize dbus-user-session fontconfig rsync
|
|
|
|
- daemonize /usr/bin/unshare --fork --pid --mount-proc /lib/systemd/systemd --system-unit=basic.target
|
|
|
|
|
|
|
|
- ls -la
|
|
|
|
- mkdir /phyre-panel
|
|
|
|
|
|
|
|
- cp installers/ubuntu-22.04/install-partial/install_base.sh /phyre-panel/install_base.sh
|
|
|
|
- chmod +x /phyre-panel/install_base.sh
|
|
|
|
- /phyre-panel/install_base.sh
|
|
|
|
|
|
|
|
- cp installers/ubuntu-22.04/install-partial/install_web.sh /phyre-panel/install_web.sh
|
|
|
|
- chmod +x /phyre-panel/install_web.sh
|
|
|
|
|
|
|
|
- cp -r web /usr/local/phyre/web/
|
|
|
|
- cd /usr/local/phyre/web/
|
|
|
|
- ls -la
|
|
|
|
|
|
|
|
- wget https://getcomposer.org/download/latest-stable/composer.phar
|
|
|
|
- COMPOSER_ALLOW_SUPERUSER=1 phyre-php composer.phar install
|
|
|
|
|
|
|
|
- /phyre-panel/install_web.sh
|
|
|
|
|
|
|
|
- apt-get install autoconf build-essential -y
|
|
|
|
- mkdir -p /usr/local/phyre/php-xdebug
|
|
|
|
- cd /usr/local/phyre/php-xdebug
|
|
|
|
- wget http://xdebug.org/files/xdebug-3.3.2.tgz
|
|
|
|
- tar -xvzf xdebug-3.3.2.tgz
|
|
|
|
- cd xdebug-3.3.2
|
|
|
|
- /usr/local/phyre/php/bin/phpize
|
|
|
|
- ./configure --enable-xdebug --with-php-config=/usr/local/phyre/php/bin/php-config
|
|
|
|
- make
|
|
|
|
|
|
|
|
- mkdir -p /usr/local/phyre/php/zend-xdebug
|
|
|
|
- cp modules/xdebug.so /usr/local/phyre/php/zend-xdebug/xdebug.so
|
|
|
|
|
|
|
|
- chmod 777 /usr/local/phyre/php/zend-xdebug/xdebug.so
|
|
|
|
|
|
|
|
- cp /usr/local/phyre/web/tests/xdebug-php-ini.txt /usr/local/phyre/php/bin/php.ini
|
|
|
|
|
|
|
|
- chmod 777 /usr/local/phyre/php/bin/php.ini
|
2024-05-11 08:43:52 +00:00
|
|
|
- phyre-php -v
|
2024-05-10 21:19:56 +00:00
|
|
|
|
|
|
|
- cd /usr/local/phyre/web/
|
|
|
|
- chmod -R 777 vendor
|
|
|
|
- apt install composer -y
|
|
|
|
- composer test:coverage
|
2024-05-11 09:01:55 +00:00
|
|
|
- mv clover.xml $MAIN_REPO_DIR/clover.xml
|
2024-05-11 09:06:18 +00:00
|
|
|
- mv coverage.xml $MAIN_REPO_DIR/coverage.xml
|
2024-05-11 08:43:52 +00:00
|
|
|
- cd $MAIN_REPO_DIR
|
|
|
|
- apt install -y pip
|
|
|
|
- pip install codecov-cli
|
2024-05-11 09:01:55 +00:00
|
|
|
- codecovcli --verbose upload-process -t $CODECOV_TOKEN
|