Skip to content

Commit

Permalink
qa: Test all currently available minor WooCommerce versions
Browse files Browse the repository at this point in the history
* Also store composer cache for all builds on a branch
* Install 2 times because WordPress overwrites plugins some times
  when it is fetched after the plugins (in srv/wp-content/plugins)
* Check if installation is possible for current PHP version
* Install coveralls on CI only and no longer on dev machines
  • Loading branch information
pretzlaw authored Sep 10, 2019
1 parent c2bec4e commit 4585377
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 11 deletions.
24 changes: 16 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,21 @@ env:
global:
- PHPUNIT_VERSION="~7|~8"
- COMPOSER_CACHE_DIR=/home/travis/.composer
- WOO_VERSION="3.6.*"
- WOO_VERSION="3.7.*"
- WP_VERSION="*"
# All jobs shall share the composer cache
- CACHE_NAME=$TRAVIS_BRANCH
matrix:
# see https://codex.wordpress.org/WordPress_Versions
# see https://phpunit.de/supported-versions.html
- WP_VERSION=4.8.*
- WP_VERSION=4.8.* WOO_VERSION="3.4.*"
- WP_VERSION=4.8.* WOO_VERSION="3.2.*"
- WP_VERSION=4.8.* WOO_VERSION="3.0.*"
- WP_VERSION=4.8.* WOO_VERSION="3.0.*"
- WP_VERSION=5.0.*
- WP_VERSION=5.2.*
- WP_VERSION=5.1.* WOO_VERSION="3.6.*"
- WP_VERSION=5.0.* WOO_VERSION="3.5.*"
- WP_VERSION=4.9.* WOO_VERSION="3.4.*"
- WP_VERSION=4.8.* WOO_VERSION="3.3.*"
- WP_VERSION=4.7.* WOO_VERSION="3.2.*"
- WP_VERSION=4.6.* WOO_VERSION="3.1.*"
- WP_VERSION=4.5.* WOO_VERSION="3.0.*"
- WP_VERSION=dev-master

matrix:
Expand All @@ -54,7 +57,7 @@ services:

cache:
directories:
- /home/travis/.composer
- $HOME/.composer

before_install:
- mysql -e 'CREATE DATABASE dev;'
Expand All @@ -64,6 +67,8 @@ before_install:
johnpbloch/wordpress:$WP_VERSION \
phpunit/phpunit:$PHPUNIT_VERSION \
wpackagist-plugin/woocommerce:$WOO_VERSION
# Rerun install because downloading WordPress will overwrite plugins
- composer install --ignore-platform-reqs

install:
- vendor/bin/wp --allow-root config create --force --dbuser=travis --dbpass="" --dbhost="127.0.0.1" --skip-check
Expand All @@ -76,9 +81,12 @@ script:
- composer validate --strict --no-check-lock
- vendor/bin/phpunit --coverage-clover coverage.xml
- vendor/bin/phpstan analyse --no-progress lib/
# Check if platform requirements would be a problem for others
- composer install --no-dev

after_script:
# upload coverage.xml file to Coveralls to analyze it
- composer require php-coveralls/php-coveralls # reinstall dev
- vendor/bin/coveralls --verbose

after_failure:
Expand Down
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@ Overall the goal is **simplicity** and **no time wasting crap** (for me and you)
which we achieve by using raw WordPress structures in the YAML instead of
reinventing the wheel.

By now we bring helper for:

* **WordPress** 4.5 - 5.2, e.g. posts, pages, user, options etc.
* **WooCommerce** 3.0 - 3.7, e.g. orders, products etc.

See below how a small Yaml-File can seed the database with tons of entries
or [read the documentation](https://github.com/rmp-up/wp-fixtures/releases)
to find out more about entities and possibilities.


## Install

Download or just
Expand All @@ -29,8 +39,8 @@ Download or just
We mostly require what Alice also needs
([see Packagist.org for more details](https://packagist.org/packages/rmp-up/wp-fixtures)):

* PHP 7.1 - 7.3
* WordPress 5.0
* PHP
* WordPress

Optional:

Expand Down
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
},
"require-dev": {
"johnpbloch/wordpress": "5.2.*",
"php-coveralls/php-coveralls": "1.1.*",
"phpstan/phpstan": "0.11.*",
"phpunit/phpunit": "7.5.*|8.2.*",
"pretzlaw/phpunit-docgen": "2.1.*|3.0.*",
Expand Down

0 comments on commit 4585377

Please sign in to comment.