fix: compatibility with WooGraphQL product/variation types #306
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Integration Testing | |
on: | |
push: | |
branches: | |
- develop | |
- main | |
pull_request: | |
branches: | |
- develop | |
- main | |
paths: | |
- "**.php" | |
- ".github/workflows/*.yml" | |
- "!docs/**" | |
# Cancel previous workflow run groups that have not completed. | |
concurrency: | |
# Group workflow runs by workflow name, along with the head branch ref of the pull request | |
# or otherwise the branch or tag ref. | |
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
continuous_integration: | |
runs-on: ubuntu-latest | |
name: WordPress ${{ matrix.wordpress }} on PHP ${{ matrix.php }} | |
strategy: | |
matrix: | |
php: ["8.2", "8.1", "8.0"] | |
wordpress: ["6.6", "6.5", "6.4", "6.3" ] | |
include: | |
- php: "8.2" | |
wordpress: "6.6" | |
coverage: 1 | |
exclude: | |
# Old WP versions that dont support newer PHP versions | |
# - php: "8.2" | |
# wordpress: "6.0" | |
# New WP versions that dont support older PHP versions | |
- php: "8.0" | |
wordpress: "6.6" | |
- php: "8.0" | |
wordpress: "6.5" | |
fail-fast: false | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: json, mbstring | |
tools: composer:v2 | |
- name: Install dependencies | |
uses: ramsey/composer-install@v3 | |
- name: Build "testing" Docker Image | |
env: | |
PHP_VERSION: ${{ matrix.php }} | |
WP_VERSION: ${{ matrix.wordpress }} | |
INCLUDE_EXTENSIONS: ${{ matrix.extensions }} | |
run: composer build-test | |
- name: Run Functional Tests w/ Docker | |
env: | |
COVERAGE: ${{ matrix.coverage }} | |
USING_XDEBUG: ${{ matrix.coverage }} | |
DEBUG: ${{ secrets.ACTIONS_STEP_DEBUG || matrix.debug }} | |
SKIP_TESTS_CLEANUP: ${{ matrix.coverage }} | |
SUITES: functional | |
PHP_VERSION: ${{ matrix.php }} | |
WP_VERSION: ${{ matrix.wordpress }} | |
run: composer run-test | |
- name: Run WPUnit Tests w/ Docker | |
env: | |
COVERAGE: ${{ matrix.coverage }} | |
USING_XDEBUG: ${{ matrix.coverage }} | |
DEBUG: ${{ secrets.ACTIONS_STEP_DEBUG || matrix.debug }} | |
SKIP_TESTS_CLEANUP: ${{ matrix.coverage }} | |
PHP_VERSION: ${{ matrix.php }} | |
WP_VERSION: ${{ matrix.wordpress }} | |
run: composer run-test | |
- name: Push Codecoverage to Coveralls.io | |
if: ${{ matrix.coverage == 1 }} | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: vendor/bin/php-coveralls -v | |
- name: Push CodeCoverage to CodeClimate | |
if: ${{ matrix.coverage == 1 }} | |
uses: paambaati/codeclimate-action@v5 | |
env: | |
CC_TEST_REPORTER_ID: ad47d548dc0d258507a0608664256e9c9f3ab9d91f32c59c6c688587e83e2610 | |
with: | |
coverageLocations: | | |
${{github.workspace}}/tests/_output/*.xml:clover |