mirror of
https://github.com/WordPress/WordPress-Coding-Standards.git
synced 2026-07-29 10:56:57 +08:00
Bumps the action-runners group with 2 updates: [actions/checkout](https://github.com/actions/checkout) and [crate-ci/typos](https://github.com/crate-ci/typos). Updates `actions/checkout` from 6.0.2 to 6.0.3 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](de0fac2e45...df4cb1c069) Updates `crate-ci/typos` from 1.46.2 to 1.47.2 - [Release notes](https://github.com/crate-ci/typos/releases) - [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md) - [Commits](aca895bf05...37bb98842b) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 6.0.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: action-runners - dependency-name: crate-ci/typos dependency-version: 1.47.2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: action-runners ... Signed-off-by: dependabot[bot] <support@github.com>
84 lines
3.1 KiB
YAML
84 lines
3.1 KiB
YAML
name: Quick Tests
|
|
|
|
on:
|
|
push:
|
|
branches-ignore:
|
|
- main
|
|
paths-ignore:
|
|
- '**.md'
|
|
# Allow manually triggering the workflow.
|
|
workflow_dispatch:
|
|
|
|
# Cancels all previous workflow runs for the same branch that have not yet completed.
|
|
concurrency:
|
|
# The concurrency group contains the workflow name and the branch name.
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
# Performs some quick tests.
|
|
# This is a much quicker test suite which only runs the unit tests and linting
|
|
# against the low/high supported PHP/PHPCS combinations.
|
|
quick-tests:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
php: [ '7.2', 'latest' ]
|
|
dependencies: [ 'lowest', 'stable' ]
|
|
|
|
name: QTest - PHP ${{ matrix.php }} on PHPCS ${{ matrix.dependencies }}
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Set up PHP
|
|
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1
|
|
with:
|
|
php-version: ${{ matrix.php }}
|
|
# With stable PHPCS dependencies, allow for PHP deprecation notices.
|
|
# Unit tests don't need to fail on those for stable releases where those issues won't get fixed anymore.
|
|
ini-values: error_reporting=-1, display_errors=On, display_startup_errors=On
|
|
coverage: ${{ github.ref_name == 'develop' && 'xdebug' || 'none' }}
|
|
|
|
- name: Enable creation of `composer.lock` file
|
|
if: ${{ matrix.dependencies == 'lowest' }}
|
|
run: composer config --unset lock
|
|
|
|
- name: Install Composer dependencies
|
|
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
|
|
with:
|
|
# Bust the cache at least once a month - output format: YYYY-MM.
|
|
custom-cache-suffix: $(date -u "+%Y-%m")
|
|
|
|
- name: "Composer: downgrade PHPCS dependencies for tests (lowest)"
|
|
if: ${{ matrix.dependencies == 'lowest' }}
|
|
run: >
|
|
composer update --prefer-lowest --no-scripts --no-interaction
|
|
squizlabs/php_codesniffer
|
|
phpcsstandards/phpcsutils
|
|
phpcsstandards/phpcsextra
|
|
|
|
- name: Lint PHP files against parse errors
|
|
if: ${{ matrix.dependencies == 'stable' }}
|
|
run: composer lint
|
|
|
|
- name: Run the unit tests without code coverage
|
|
if: ${{ github.event.repository.fork == true || github.ref_name != 'develop' }}
|
|
run: composer run-tests
|
|
|
|
- name: Run the unit tests with code coverage
|
|
if: ${{ github.event.repository.fork == false && github.ref_name == 'develop' }}
|
|
run: composer coverage
|
|
|
|
- name: Send coverage report to Codecov
|
|
if: ${{ success() && github.event.repository.fork == false && github.ref_name == 'develop' }}
|
|
uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1
|
|
with:
|
|
files: ./build/logs/clover.xml
|
|
fail_ci_if_error: true
|
|
verbose: true
|
|
env:
|
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|