Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Sync branches

Sync branches #153

name: Testing Integration
on:
push:
branches:
- develop
- master
pull_request:
branches:
- develop
- master
paths:
- '**.php'
- '.github/workflows/*.yml'
- '!docs/**'
jobs:
continuous_integration:
runs-on: ubuntu-latest
strategy:
matrix:
php: [ '8.0', '7.4', '7.3' ]
wordpress: [ '6.0', '5.9', '5.8', '5.7.2', '5.6', '5.5.3' ]
include:
- php: '8.0'
wordpress: '5.7.2'
WPGRAPHQL_VERSION: 'v1.5.3'
- php: '7.4'
wordpress: '5.7.2'
coverage: 1
- php: '7.4'
wordpress: '5.7.2'
WPGRAPHQL_VERSION: 'v1.5.3'
- php: '7.4'
wordpress: '5.7.2'
WPGRAPHQL_VERSION: 'v1.3.5'
- php: '7.4'
wordpress: '5.7.2'
WPGRAPHQL_VERSION: 'v1.2.6'
- php: '7.4'
wordpress: '5.7.2'
WPGRAPHQL_VERSION: 'v1.1.8'
- php: '7.4'
wordpress: '5.7.2'
WPGRAPHQL_VERSION: 'v1.0.5'
- php: '7.4'
wordpress: '5.7.2'
WPGRAPHQL_VERSION: 'v0.15.5'
- php: '7.4'
wordpress: '5.7.2'
WPGRAPHQL_VERSION: 'v0.14.0'
- php: '7.4'
wordpress: '5.7.2'
WPGRAPHQL_VERSION: 'v0.13.3'
- php: '7.4'
wordpress: '5.7.2'
WPGRAPHQL_VERSION: 'v0.12.3'
- php: '7.4'
wordpress: '5.7.2'
WPGRAPHQL_VERSION: 'v0.11.0'
- php: '7.4'
wordpress: '5.7.2'
WPGRAPHQL_VERSION: 'v0.11.0'
- php: '7.4'
wordpress: '5.5.3'
- php: '7.3'
wordpress: '5.5.3'
exclude:
- php: '8.0'
wordpress: '5.5.3'
- php: '7.3'
wordpress: '6.0'
fail-fast: false
name: WordPress ${{ matrix.wordpress }} on PHP ${{ matrix.php }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
extensions: json, mbstring, zip, unzip
- name: Get Composer Cache Directory
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composercache.outputs.dir }}
key: php-${{ matrix.php }}-${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: php-${{ matrix.php }}-${{ runner.os }}-composer-
- name: Install dependencies
run: composer install
- name: Build container image
env:
PHP_VERSION: ${{ matrix.php }}
WP_VERSION: ${{ matrix.wordpress }}
run: |
docker-compose build \
--build-arg WP_VERSION=${{ matrix.wordpress }} \
--build-arg PHP_VERSION=${{ matrix.php }} \
--build-arg DOCKER_REGISTRY=ghcr.io/wp-graphql/
- name: Run Tests w/ Docker.
env:
COVERAGE: ${{ matrix.coverage }}
USING_XDEBUG: ${{ matrix.coverage }}
DEBUG: ${{ matrix.debug }}
SKIP_TESTS_CLEANUP: ${{ matrix.coverage }}
PHP_VERSION: ${{ matrix.php }}
WP_VERSION: ${{ matrix.wordpress }}
DOCKER_REGISTRY: ghcr.io/wp-graphql/
run: composer run-test
- 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