wp-cli / scaffold-command

Generates code for post types, taxonomies, blocks, plugins, child themes, etc.
MIT License
166 stars 86 forks source link

Gitlab CI tests lacks tests for different WP versions #69

Open nextgenthemes opened 6 years ago

nextgenthemes commented 6 years ago

Or am I missing something?

I am used to travis where you can define several WP versions for the tests.

I am new to docker but I have a fair knowlege about Linux and Ubuntu.

One way that could be done is by actually just cleaning the /tmp folder and installing the tests again with a different WP version. This way not a complete new docker bootup would be needed. Not sure if that is a good way.

Like this. Assuming the config that wp-cli currently adds. Untested

PHPunit:PHP5.3:MySQL:
  image: tetraweb/php:5.3
  services:
    - mysql:5.6
  script:
  - phpcs
  - phpunit
  - rm -rf /tmp/*
  - bash bin/install-wp-tests.sh wordpress_tests root mysql mysql nightly true
  - phpcs
  - phpunit
schlessera commented 6 years ago

Related #25

schlessera commented 6 years ago

Related https://github.com/wp-cli/scaffold-command/issues/30

danielbachhuber commented 6 years ago

One way that could be done is by actually just cleaning the /temp folder and installing the tests again with a different WP version. This way not a complete new docker bootup would be needed. Nut sure if that is a good way.

This is how we've done it with Circle 1.0 too.

No reason that it hasn't been done other than that it wasn't done. It'd be nice to get a sample repo going on GitLab so we can test these changes to the scaffolded configuration.