Skip to content

Merge commit '9be4b7340bb25139dcee421d31724993b9d17cba' into develop #503

Merge commit '9be4b7340bb25139dcee421d31724993b9d17cba' into develop

Merge commit '9be4b7340bb25139dcee421d31724993b9d17cba' into develop #503

name: Testing Integration
on:
push:
branches:
- develop
- main
pull_request:
branches:
- develop
- main
paths:
- '**.php'
- '!docs/**'
jobs:
continuous_integration:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- php: '8.2'
wordpress: '6.5'
acf_pro: true
wpgraphql_content_blocks: true
coverage: 1
- php: '8.1'
wordpress: '6.5'
acf_pro: true
wpgraphql_content_blocks: true
- php: '8.0'
wordpress: '6.4'
acf_pro: true
wpgraphql_content_blocks: true
- php: '8.2'
wordpress: '6.5'
acf_pro: false
wpgraphql_content_blocks: false
- php: '8.1'
wordpress: '6.5'
acf_pro: false
wpgraphql_content_blocks: false
- php: '8.0'
wordpress: '6.4'
acf_pro: false
wpgraphql_content_blocks: false
- php: '7.4'
wordpress: '6.1'
acf_pro: true
wpgraphql_content_blocks: true
acf_version: '6.1.8'
fail-fast: false
name: WordPress ${{ matrix.wordpress }}, PHP ${{ matrix.php }}, ACF ${{matrix.acf_version}}, ACF & ACF EXTENDED PRO ${{matrix.acf_pro}}, WPGRAPHQL Content Blocks ${{matrix.wpgraphql_content_blocks}}
steps:
- name: Checkout
uses: actions/checkout@v4
# This is used in case the IP gets blocked by one of the services used to download the pro plugins
- name: 🔎 Check IP
run: curl https://api.ipify.org
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
extensions: json, mbstring, zip, unzip
- name: Install dependencies
uses: ramsey/composer-install@v2
with:
composer-options: "--no-dev"
- name: Copy environment files
run: |
cp .env.dist .env
cp .env.testing.dist .env.testing
- name: Build and run tests
env:
PHP_VERSION: ${{ matrix.php }}
WP_VERSION: ${{ matrix.wordpress }}
# NOTE: We test against WPGraphQL Content Blocks if ACF Pro is active
run: |
docker-compose build \
--build-arg WP_VERSION=${{ matrix.wordpress }} \
--build-arg PHP_VERSION=${{ matrix.php }} \
--build-arg DOCKER_REGISTRY=ghcr.io/wp-graphql/
docker-compose run \
-e PHP_VERSION=${{ matrix.php }} \
-e WP_VERSION=${{ matrix.wordpress }} \
-e COVERAGE=${{ matrix.coverage }} \
-e USING_XDEBUG=${{ matrix.coverage }} \
-e DEBUG=${{ matrix.debug }} \
-e SKIP_TESTS_CLEANUP=${{ matrix.coverage }} \
-e ACF_PRO=${{matrix.acf_pro }} \
-e ACF_LICENSE_KEY=${{secrets.ACF_LICENSE_KEY}} \
-e ACF_VERSION=${{matrix.acf_version}} \
-e ACF_EXTENDED_LICENSE_KEY=${{secrets.ACF_EXTENDED_LICENSE_KEY}} \
-e WPGRAPHQL_CONTENT_BLOCKS=${{matrix.wpgraphql_content_blocks}} \
testing
- name: Push Codecoverage to Coveralls.io
if: ${{ matrix.coverage == 1 }}
env:
COVERALLS_RUN_LOCALLY: 1
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: vendor/bin/php-coveralls -v