Automated-Testing #82
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: Automated-Testing | |
on: | |
schedule: | |
- cron: '0 4 * * 5' | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
paths: | |
- '**.php' | |
- '!docs/**' | |
jobs: | |
Automated-Testing: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php: ['8.1', '8.0', '7.4'] | |
wordpress: ['6.2', '6.1', '6.0'] | |
composer_version: ['v2'] | |
include: | |
- php: '7.4' | |
wordpress: '6.1' | |
coverage: '--coverage --coverage-xml' | |
xdebug: '2.9.6' | |
- php: '8.1' | |
wordpress: '6.0' | |
debug: '--debug' | |
- php: '7.4' | |
xdebug: '3.1.6' | |
- php: '8.0' | |
xdebug: '3.1.6' | |
- php: '8.1' | |
xdebug: '3.2.1' | |
fail-fast: false | |
name: Testing QL Events in WordPress v${{ matrix.wordpress }} running on PHP ${{ matrix.php }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: json, mbstring | |
tools: composer:v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.COMPOSER_TOKEN }} | |
- name: Install dependencies | |
env: | |
WP_VERSION: ${{ matrix.wordpress }} | |
run: | | |
cp .env.testing .env | |
rm -rf composer.lock | |
composer install | |
SKIP_DB_CREATE=true SKIP_WP_SETUP=true composer install-test-env | |
- name: Run Tests w/ Docker. | |
env: | |
XDEBUG_VERSION: ${{ matrix.xdebug }} | |
WP_VERSION: ${{ matrix.wordpress }} | |
PHP_VERSION: ${{ matrix.php }} | |
run: composer run-codeception -- ${{ matrix.coverage }} ${{ matrix.debug }} | |
- name: Push Codecoverage to Coveralls.io | |
if: ${{ matrix.coverage == '--coverage --coverage-xml' }} | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
composer global require php-coveralls/php-coveralls | |
php-coveralls -v |