wordpress-event-bridge-for-.../.woodpecker/test.yml

29 lines
1 KiB
YAML
Raw Normal View History

2024-09-20 21:50:15 +02:00
when:
- event: push
branch: woodpecker
steps:
- name: build
image: wordpressdevelop/phpunit
2024-09-20 22:24:34 +02:00
environment:
WP_TESTS_PHPUNIT_POLYFILLS_PATH: vendor/yoast/phpunit-polyfills
2024-09-20 21:50:15 +02:00
commands:
2024-09-20 21:54:21 +02:00
- apt-get clean
2024-09-20 22:36:55 +02:00
- apt install -y apt-transport-https lsb-release ca-certificates wget
- wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
- echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/php.list
2024-09-20 21:54:21 +02:00
- apt-get -yqq update
2024-09-20 22:33:35 +02:00
- apt-get -yqqf install zip unzip subversion php8.2-mysql php8.2-bz2 php8.2-mcrypt
2024-09-20 22:30:05 +02:00
- docker-php-ext-enable mbstring mcrypt mysqli pdo_mysql intl gd zip bz2
2024-09-20 22:21:10 +02:00
- composer require --dev yoast/phpunit-polyfills:"^3.0"
2024-09-20 22:08:20 +02:00
- composer install
2024-09-20 22:30:05 +02:00
- bash bin/install-wp-tests.sh wordpress_tests root mysql mysql latest true
2024-09-20 21:54:21 +02:00
- phpunit --configuration phpunit.xml.dist
2024-09-20 21:57:51 +02:00
services:
- name: database
image: mysql
environment:
2024-09-20 21:58:50 +02:00
MYSQL_DATABASE: wordpress_tests
MYSQL_ROOT_PASSWORD: mysql