Remove page reload #24
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: CI | |
on: | |
# Run on pushes to `main` and `develop` and on all pull requests. | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- '**.md' | |
pull_request: | |
# Allow manually triggering the workflow. | |
workflow_dispatch: | |
jobs: | |
# Setup everything we need for integration testing. | |
integration: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php: [ '8.2', '8.1', '8.0', '7.4' ] | |
continue-on-error: ${{ matrix.php == '8.4' }} | |
name: "Test PHP ${{ matrix.php }}" | |
services: | |
mysql: | |
image: mysql:8.0.29 | |
env: | |
MYSQL_ROOT_PASSWORD: secret | |
MYSQL_DATABASE: wp_test | |
ports: | |
- "3306:3306" | |
options: >- | |
--health-cmd "mysqladmin ping -ppass" | |
--health-interval 10s | |
--health-start-period 10s | |
--health-timeout 5s | |
--health-retries 10 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Wait if other jobs are running | |
uses: ahmadnassri/action-workflow-queue@v1 | |
- name: Install WordPress | |
working-directory: ./bin | |
run: ./install-wp-tests.sh wp_test_${{ matrix.php }} root secret 127.0.0.1 latest | |
continue-on-error: true | |
- name: Install PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
ini-values: error_reporting=E_ALL, display_errors=On | |
coverage: xdebug | |
# Install dependencies and handle caching in one go. | |
# @link https://github.com/marketplace/actions/install-php-dependencies-with-composer | |
- name: Install Composer dependencies - normal | |
if: matrix.php != '8.4' | |
uses: "ramsey/composer-install@v3" | |
continue-on-error: true | |
with: | |
# Bust the cache at least once a month - output format: YYYY-MM. | |
custom-cache-suffix: $(date -u "+%Y-%m") | |
- name: Lint PHP files against parse errors | |
run: composer lint | |
- name: Unit and integration testing (with debug output) | |
run: ./vendor/bin/phpunit --configuration phpunit-with-integration.xml --no-coverage | |
- name: Generate code coverage | |
working-directory: ./ | |
run: ./vendor/bin/phpunit --configuration phpunit-with-integration.xml --coverage-clover ./build/clover.xml | |
continue-on-error: true | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4.0.1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
slug: plausible/wordpress |