From c0dc94844a7b95621c964d456da71373b289647f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Fri, 20 Sep 2024 22:52:14 +0200 Subject: [PATCH] test --- .forgejo/workflows/phpunit.yml | 5 +---- .woodpecker/test.yml | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 .woodpecker/test.yml diff --git a/.forgejo/workflows/phpunit.yml b/.forgejo/workflows/phpunit.yml index 6e128d2..283d093 100644 --- a/.forgejo/workflows/phpunit.yml +++ b/.forgejo/workflows/phpunit.yml @@ -12,12 +12,9 @@ jobs: image: mariadb env: MYSQL_ROOT_PASSWORD: root - ports: - - 3306:3306 strategy: matrix: php-versions: ['8.1'] - wp-version: [latest] name: Run phpunit tests env: extensions: mysql @@ -47,7 +44,7 @@ jobs: run: sudo apt update && sudo apt -y upgrade && sudo apt -y install mysql-client - name: Setup Test Environment - run: bash bin/install-wp-tests.sh wordpress_test root root mysql:3306 ${{ matrix.wp-version }} + run: bash bin/install-wp-tests.sh wordpress_test root root mysql latest - name: Unit Testing run: ./vendor/bin/phpunit diff --git a/.woodpecker/test.yml b/.woodpecker/test.yml new file mode 100644 index 0000000..fe28da6 --- /dev/null +++ b/.woodpecker/test.yml @@ -0,0 +1,19 @@ +when: + - event: push + branch: woodpecker + +steps: + - name: build + image: php:8.3 + environment: + WP_TESTS_PHPUNIT_POLYFILLS_PATH: vendor/yoast/phpunit-polyfills + commands: + - apt -y update + - apt -y install libonig-dev + - docker-php-ext-install mbstring mysqli pdo_mysql intl gd zip bz2 + - docker-php-ext-enable mbstring mysqli pdo_mysql intl gd zip bz2 + - composer require --dev yoast/phpunit-polyfills:"^3.0" + - composer install + - bash bin/install-wp-tests.sh wordpress_tests root mysql mysql latest true + - phpunit --configuration phpunit.xml.dist +