This repository has been archived by the owner on Sep 6, 2024. It is now read-only.
Merge pull request #284 from Automattic/fix/markdown #135
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: Required PHP Checks | |
on: | |
pull_request: | |
push: | |
branches: [master, '*/branch-*'] | |
env: | |
COMPOSER_ROOT_VERSION: "dev-master" | |
jobs: | |
phpunit: | |
name: "PHPCS & PHPUnit" | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 7.4 | |
tools: composer | |
coverage: none | |
- name: Get Composer cache directory | |
id: composer-cache | |
run: | | |
echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Composer cache | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-composer- | |
- name: Tool versions | |
run: | | |
php --version | |
composer --version | |
- name: Setup environment | |
run: composer install --prefer-dist --no-progress --no-ansi --no-interaction | |
- name: Run linting | |
run: composer lint | |
- name: Run tests | |
run: composer test |