Skip to content

fix[faustwp]: (#1872) add filter for search_pattern in handle_generate_endpoint #639

fix[faustwp]: (#1872) add filter for search_pattern in handle_generate_endpoint

fix[faustwp]: (#1872) add filter for search_pattern in handle_generate_endpoint #639

name: Unit Test Plugin
on:
pull_request:
branches-ignore:
- 'next'
paths-ignore:
- '**/*.md'
jobs:
unit_test_plugin:
name: WordPress ${{ matrix.wordpress }}
runs-on: ubuntu-22.04
strategy:
matrix:
wordpress: [ '6.9', '6.8', '6.7', '6.6', '6.5', '6.4', '6.3' ]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create Docker Containers
env:
WP_VERSION: ${{ matrix.wordpress }}
working-directory: ./plugins/faustwp
run: |
docker compose build \
--build-arg WP_VERSION=${{ matrix.wordpress }}
docker compose up -d
- name: Wait for db
working-directory: ./plugins/faustwp
run: |
until docker compose exec -T db mysqladmin ping -pwordpress --silent; do
sleep 1
done
- name: Setup testing framework
working-directory: ./plugins/faustwp
run: docker exec -e COVERAGE=1 $(docker compose ps -q wordpress) init-testing-environment.sh
- name: Install and activate WP GraphQL
working-directory: ./plugins/faustwp
run: docker exec -e COVERAGE=1 -w /var/www/html/wp-content/plugins/faustwp $(docker compose ps -q wordpress) wp plugin install wp-graphql --activate --allow-root
- name: Install Dependencies
working-directory: ./plugins/faustwp
run: docker exec -e COVERAGE=1 -w /var/www/html/wp-content/plugins/faustwp $(docker compose ps -q wordpress) composer install
- name: Run unit tests
working-directory: ./plugins/faustwp
run: docker exec -e COVERAGE=1 -w /var/www/html/wp-content/plugins/faustwp $(docker compose ps -q wordpress) composer test