Skip to content

Merge pull request #261 from superhuit-agency/fix/deprecation-data-lo… #513

Merge pull request #261 from superhuit-agency/fix/deprecation-data-lo…

Merge pull request #261 from superhuit-agency/fix/deprecation-data-lo… #513

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 test environment
env:
PHP_VERSION: ${{ matrix.php }}
WP_VERSION: ${{ matrix.wordpress }}
COVERAGE: ${{ matrix.coverage }}
USING_XDEBUG: ${{ matrix.coverage }}
DEBUG: ${{ secrets.ACTIONS_STEP_DEBUG || matrix.debug }}
SKIP_TESTS_CLEANUP: ${{ matrix.coverage }}
ACF_PRO: ${{matrix.acf_pro }}
ACF_LICENSE_KEY: ${{secrets.ACF_LICENSE_KEY}}
ACF_VERSION: ${{matrix.acf_version}}
ACF_EXTENDED_LICENSE_KEY: ${{secrets.ACF_EXTENDED_LICENSE_KEY}}
WPGRAPHQL_CONTENT_BLOCKS: ${{matrix.wpgraphql_content_blocks}}
run: composer build-test
- name: Run tests
run: composer run-test
env:
PHP_VERSION: ${{ matrix.php }}
WP_VERSION: ${{ matrix.wordpress }}
COVERAGE: ${{ matrix.coverage }}
USING_XDEBUG: ${{ matrix.coverage }}
DEBUG: 1
SKIP_TESTS_CLEANUP: ${{ matrix.coverage }}
ACF_PRO: ${{matrix.acf_pro }}
ACF_LICENSE_KEY: ${{secrets.ACF_LICENSE_KEY}}
ACF_VERSION: ${{matrix.acf_version}}
ACF_EXTENDED_LICENSE_KEY: ${{secrets.ACF_EXTENDED_LICENSE_KEY}}
WPGRAPHQL_CONTENT_BLOCKS: ${{matrix.wpgraphql_content_blocks}}
- 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