Feature/dswp 59 pattern vertical card #61
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 | |
env: | |
WP_CORE_DIR: /tmp/WordPress | |
WP_TESTS_DIR: /tmp/WordPress/wordpress-tests-lib | |
services: | |
mysql: | |
# Update the specific version of MySQL to match the version used on your server. | |
image: mysql:8 | |
env: | |
MYSQL_ROOT_PASSWORD: 'rootpassword' | |
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 Node.js 20 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- name: Install dependencies | |
run: | | |
composer install | |
npm install | |
- name: Install SVN | |
run: sudo apt-get update && sudo apt-get install -y subversion | |
- name: Configure Tests | |
run: composer test-setup | |
- name: Run PHPUnit tests | |
run: vendor/bin/phpunit --configuration vendor/bcgov/wordpress-utils/phpunit.xml.dist | |
- name: Run tests | |
run: | | |
npm run test |