flexisip-account-manager/.gitlab-ci-files/test.yml
2025-09-09 09:24:44 +02:00

85 lines
2.3 KiB
YAML

rocky8-test:
extends: .rocky-test
image: gitlab.linphone.org:4567/bc/public/docker/rocky8-php:$ROCKY_8_IMAGE_VERSION
needs:
- rocky8-package
rocky9-test:
extends: .rocky-test
image: gitlab.linphone.org:4567/bc/public/docker/rocky9-php:$ROCKY_9_IMAGE_VERSION
needs:
- rocky9-package
rocky10-test:
extends: .rocky-test
image: gitlab.linphone.org:4567/bc/public/docker/rocky10-php:$ROCKY_10_IMAGE_VERSION
needs:
- rocky10-package
.rocky-test:
extends: .test
script:
- yum -y localinstall build/*.rpm
- cd /opt/belledonne-communications/share/flexisip-account-manager/flexiapi
- composer install --ignore-platform-req=ext-sodium # Rocky 8 and 9 use the external library
- vendor/bin/phpcs
- vendor/bin/phpmd . ansi phpmd.xml
- php artisan key:generate
- vendor/bin/phpunit --log-junit $CI_PROJECT_DIR/flexiapi_phpunit.log
debian12-test:
extends: .debian-test
image: gitlab.linphone.org:4567/bc/public/docker/debian12-php:$DEBIAN_12_IMAGE_VERSION
needs:
- debian12-package
debian13-test:
extends: .debian-test
image: gitlab.linphone.org:4567/bc/public/docker/debian13-php:$DEBIAN_13_IMAGE_VERSION
needs:
- debian13-package
.debian-test:
extends: .test
script:
#- apt update
- apt install -y ./build/*.deb
- cd /opt/belledonne-communications/share/flexisip-account-manager/flexiapi
- composer install
- vendor/bin/phpcs
- vendor/bin/phpmd . ansi phpmd.xml
- php artisan key:generate
- vendor/bin/phpunit --log-junit $CI_PROJECT_DIR/flexiapi_phpunit.log
mysql-latest-test:
extends: .test
image: gitlab.linphone.org:4567/bc/public/docker/debian12-php:$DEBIAN_12_IMAGE_VERSION
needs:
- debian12-package
services:
- mysql
variables:
MYSQL_ROOT_PASSWORD: flexiapi
MYSQL_DATABASE: flexiapi
DB_HOST: mysql
DB_DATABASE: flexiapi
DB_PASSWORD: flexiapi
DB_USERNAME: root
script:
- apt update
- apt install -y ./build/*.deb
- cd /opt/belledonne-communications/share/flexisip-account-manager/flexiapi
- composer install --dev
- php artisan db:show
- php artisan migrate
- php artisan migrate:rollback
.test:
tags: ["docker"]
stage: test
artifacts:
paths:
- $CI_PROJECT_DIR/flexiapi_phpunit.log
- flexiapi/storage/logs/
when: always
expire_in: 1 day