Skip to content

feature: Add variable validation rule to query save #626

feature: Add variable validation rule to query save

feature: Add variable validation rule to query save #626

Workflow file for this run

name: Tests - WordPress
on:
push:
branches:
- develop
- main
pull_request:
branches:
- develop
- main
jobs:
run:
runs-on: ubuntu-latest
name: WordPress ${{ matrix.wordpress }} Integration Tests on PHP ${{ matrix.php }}
strategy:
fail-fast: false
matrix:
php: [ '8.1', '8.0' ]
wordpress: [ '6.2', '6.1' ]
wpgraphql_version: [ 'latest' ]
include:
# WordPress isn't pushing php 8.2 and WP 5.9 to Docker
# so we include WP 5.9 manually instead of in the matrix
- php: '8.1'
wordpress: '5.9'
- php: '7.4'
wordpress: '5.9'
steps:
- name: Checkout
uses: actions/checkout@v2
- 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: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer
- 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: Composer update dependencies
run: composer update
- name: Run acceptance, functional tests
run: docker-compose run -e DEBUG=1 -e WPGRAPHQL_VERSION=${{matrix.wpgraphql_version}} testing
env:
WP_VERSION: ${{ matrix.wordpress }}
PHP_VERSION: ${{ matrix.php }}
SUITES: use value from .env