Skip to content

Initialize the plugin #5

Initialize the plugin

Initialize the plugin #5

Workflow file for this run

name: Tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
checks: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Start MySQL
run: |-
sudo /etc/init.d/mysql start
mysql -e 'CREATE DATABASE IF NOT EXISTS wordpress;' -uroot -proot
- name: Setup WP-CLI
uses: godaddy-wordpress/setup-wp-cli@1
- name: Install WordPress
run: |-
wp core download --path=wordpress --force --quiet
wp config create --path=wordpress --dbname=wordpress --dbuser=root --dbpass=root
wp core install --path=./wordpress --url=localhost --title=WordPress --admin_user=admin --admin_password=password --admin_email=wordpress@github.fund-me.com
- uses: actions/checkout@v3
with:
path: wordpress/wp-content/plugins/fund-me
- name: Validate composer.json and composer.lock
working-directory: ./wordpress/wp-content/plugins/fund-me
run: composer validate --strict
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: ./wordpress/wp-content/plugins/fund-me/vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
working-directory: ./wordpress/wp-content/plugins/fund-me
run: composer install --prefer-dist --no-progress
- name: Run test suite
working-directory: ./wordpress/wp-content/plugins/fund-me
run: composer run-script ci-test
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: always()
with:
report_paths: './wordpress/wp-content/plugins/fund-me/junit-result.xml'