Add more PR checklist files #25
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: Run code sniff on PR | |
on: | |
pull_request | |
jobs: | |
test: | |
name: Code sniff (PHP 7.4, WP Latest) | |
timeout-minutes: 15 | |
runs-on: ubuntu-latest | |
services: | |
database: | |
image: mysql:5.6 | |
env: | |
MYSQL_ROOT_PASSWORD: root | |
ports: | |
- 3306:3306 | |
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Checkout submodules | |
run: git submodule update --init --recursive | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 7.4 | |
tools: composer | |
extensions: mysql | |
coverage: none | |
- name: Tool versions | |
run: | | |
php --version | |
composer --version | |
- name: Get cached composer directories | |
uses: actions/cache@v2 | |
with: | |
path: | | |
./packages | |
./vendor | |
key: ${{ runner.os }}-${{ hashFiles('./composer.lock') }} | |
- name: Setup and install composer | |
run: composer install | |
- name: Init DB and WP | |
run: ./tests/bin/install.sh wpadcenter_test root root 127.0.0.1 latest | |
- name: Run code sniff | |
run: RUN_PHPCS=1 bash ./tests/bin/phpcs.sh |