added production checks github action #2
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: Testing | |
on: | |
pull_request: | |
branches: | |
- development | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
services: | |
mysql: | |
# Update the specific version of MySQL to match the version used on your server. | |
image: mysql:8 | |
env: | |
MYSQL_ALLOW_EMPTY_PASSWORD: true | |
ports: | |
- 3306:3306 | |
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: PHP Setup | |
uses: shivammathur/setup-php@v2 | |
with: | |
# Update the specific version of PHP to match the version used on your server. | |
php-version: '7.4' | |
- name: Install dependencies | |
run: | | |
composer install | |
npm install | |
npm install @wordpress/scripts --save-dev | |
- name: Configure Tests | |
run: composer test-setup | |
- name: Run PHPUnit tests | |
run: vendor/bin/phpunit --configuration phpunit.xml.dist | |
- name: Run tests | |
run: | | |
npm run test || exit 1 |