Running Panopoly's Behat tests on Travis-CI

Last updated on
30 April 2025

We (the maintainers) commit all Panopoly changes both to Drupal.org and to GitHub, so that Travis-CI will run our Behat tests on every commit. You can see the latest builds here:

https://travis-ci.org/panopoly/panopoly/builds

This is great for the main repo. However, YOU can also use Travis-CI to run the full Behat test suite just by signing up for Travis-CI and forking our repo on GitHub. That is what this document is about!

(NOTE #1: We don't accept contributions through GitHub, that's only for integration with Travis-CI. All contributions should come through Drupal.org using the normal Drupal patch workflow.)

(NOTE #2: If you want to run the Behat tests locally rather than on Travis-CI, check out: Running Panopoly's Behat tests locally (and adding your own!).)

Getting Travis-CI to run the Panopoly tests on your fork

Steps to get started:

  1. Go to https://github.com/panopoly/panopoly and fork the repo (you'll need to be logged in to your GitHub account)
  2. Go to http://travis-ci.org/ and sign up
  3. Go to your profile page on Travis-CI: https://travis-ci.org/profile
  4. You'll see all your GitHub repos here. Flip the switch to enable Travis for your fork of the Panopoly repo
  5. Now, any time you commit and push to your fork, a build will start on Travis-CI!

In order to stay up-to-date with Panopoly changes, the following is recommended:

  • Add the main Panopoly repo as a remote and pull regularly into your 7.x-1.x branch. You can add the remote like so:
    git remote add upstream http://git.drupal.org/project/panopoly.git
    

    And then any time you want to pull in the latest Panopoly changes, you can do:

    git checkout 7.x-1.x
    git pull upstream 7.x-1.x
    git push
    
  • Make all of your commits in branches other than the main 7.x-1.x branch. This way you keep the 7.x-1.x branch clean to hold the upstream version.
  • If you're going to make a ton of commits, please edit the .travis.yml and remove the 'notifications' section. This way you won't spam people with information about all your builds

Quickly running the Panopoly tests on an issue in the queue

If you just want to quickly run a patch in the Panopoly queue on Travis, we have a script for that! But in order to use it, you already need to have done the setup above, so that you have your own Panopoly fork that's registered with Travis.

Once you do you can run the following from the checkout of your fork:

scripts/create_test_branch.py <issue-number> --git-repo <your-git-repo-url>

So, for example, this is the command-line I would use to test #2371247: Upgrade to Behat 3 / Drupal Extension 3:

scripts/create_test_branch.py 2371247 --git-repo git@github.com:dsnopek/panopoly.git

The script uses the Drupal.org API to pull information off the issue, and then creates a test branch using Git to kick off the Travis build.

It uses the "Component" on the issue and the name of the patch (when there are multiple patchs for multiple Panopoly components) to figure out how and what to patch.

Also, the --skip-upgrade-tests argument is useful - it'll run a build which doesn't do the upgrade tests, in case you want to save time.

Help improve this page

Page status: Not set

You can: