Skip to content

Version 1.6.2

Version 1.6.2 #335

Workflow file for this run

name: CI Test
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
Test-Plugin:
name: Test plugin with wc-${{ matrix.woocommerce }} and wp-${{ matrix.wordpress }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
wordpress: [latest]
woocommerce: [4.4.0, 4.3.0, 4.2.0, 4.1.0, 4.0.0, 3.9.0, 3.8.0, 3.7.0]
os: [ubuntu-latest]
php: [7.0]
container:
image: chriszarate/wordpress-phpunit:6.0.6
volumes:
- "testsuite:/tmp"
services:
mysql:
image: mysql:5.7
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: wordpress_test
MYSQL_USER: wp_user
MYSQL_PASSWORD: wp_pass
ports:
- "33060:3306"
volumes:
- "${{ github.workspace }}/tests/bin/mysql:/docker-entrypoint-initdb.d"
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Settup repo
uses: actions/checkout@v2
with:
path: main
- name: Settup WooCommerce
uses: actions/checkout@v2
with:
repository: woocommerce/woocommerce
ref: ${{ matrix.woocommerce }}
path: woocommerce
- name: Install WP Testsuite
run: |
chmod +x ./main/tests/bin/install-wp-tests.sh
./main/tests/bin/install-wp-tests.sh wordpress_test wp_user wp_pass mysql ${{ matrix.wordpress }}
env:
MYSQL_HOST: mysql
- name: Run PHPUnit
run: |
phpunit -c main/phpunit.xml
PHPCS:
name: PHPCS
runs-on: ubuntu-latest
container:
image: php:7.0.0-apache
steps:
- name: Settup repo
uses: actions/checkout@v2
with:
path: main
- name: Install Packages
run: |
echo "Update package lists."
apt-get update
echo "Install base packages."
apt-get install -y build-essential libssl-dev gnupg libfreetype6-dev libjpeg62-turbo-dev libmcrypt-dev libicu-dev libxml2-dev vim wget unzip
- name: Install Composer
run: |
echo "Install composer."
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
- name: Install PHPCS with WordPress Coding Standards
run: |
composer global require woocommerce/woocommerce-sniffs
- name: Run PHPCS Coding Standards
run: |
~/.config/composer/vendor/bin/phpcs main --standard=WordPress --extensions=php --ignore=config.php,bootstrap.php .