PHPackages                             pantheon-systems/travis-scripts - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. pantheon-systems/travis-scripts

AbandonedArchivedLibrary[DevOps &amp; Deployment](/categories/devops)

pantheon-systems/travis-scripts
===============================

Use Travis to build a Drupal site with Composer, test with Behat, and then deploy to Pantheon.

1.4.6(10y ago)621981Shell

Since Jun 16Pushed 10y ago24 watchersCompare

[ Source](https://github.com/pantheon-systems/travis-scripts)[ Packagist](https://packagist.org/packages/pantheon-systems/travis-scripts)[ RSS](/packages/pantheon-systems-travis-scripts/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (29)Used By (1)

This project is deprecated; will be replaced with a newer and more comprehensive [example Drupal 7 Travis CI Composer project](https://github.com/pantheon-systems/example-drupal7-travis-composer), which will be used to quickly create your own derived project. See the [example Drupal 7 Circle CI Composer project](https://github.com/pantheon-systems/example-drupal7-circle-composer), which is more up-to-date, but works with Circle CI rather than Travis.

Original Documentation
----------------------

[](#original-documentation)

This project is designed to be included from the **require** section of a Drupal site's `composer.json` file. Doing this allows you to achieve the following things:

- Specify the Drupal modules, themes and libraries you use in your composer.json file, and build them with Composer.
- Automatically build components via Travis or Circle CI every commit.
- Use Behat to run tests on your site from Travis.
- Automatically deploy your site to your Pantheon dev environment, or some other branch, every time the tests pass.

All of this can be accomplished with only a few light files committed to your repository.

Setup
-----

[](#setup)

Copy the contents of the `examples` directory to the root of your project, renaming files as appropriate:

```
  example.gitignore     -> .gitignore
  example.travis.yml    -> .travis.yml
  example.behat.yml     -> behat.yml
  features              -> features

```

You will also need a composer.json file for your project. The project [example-drupal7-travis-composer](https://github.com/pantheon-systems/example-drupal7-travis-composer) can be used as a template to quickly create your own project; for Drupal 8, see [drupal-composer/drupal-project](https://github.com/drupal-composer/drupal-project).

Configuration
-------------

[](#configuration)

You must customize the contents of these files to suit the needs of your project. See the detailed instructions below; more information is also available in the comments inside each file.

#### Composer

[](#composer)

Do not use the composer.json file included in the pantheon-systems/travis-scripts project; instead, use one from a project mentioned in the section **Setup**, above.

Set the **name** and **description** in your composer.json file to something appropriate for your project.

Customize the **require** section to contain the modules and themes needed for your project. You might want to try using [drush composer-generate](https://www.drupal.org/project/composer_generate) to get started. If you want to run your site on Pantheon, then you should keep "pantheon-systems/drops-7" as your main component; otherwise, you may replace this with "drupal/drupal" if you prefer.

The custom installers in the **require** section of your composer.json file control the way the components in your project are installed. Always keep these items at the top, so that they are available at the very beginning of the installation process. Modules and themes listed before the custom installers might not install correctly.

#### Travis CI

[](#travis-ci)

Set up your project to be tested by Travis CI:

- Log in to  in your web browser
- Click on the "+" next to "My Repositories"
- Find the repository you would like to configure to test. Navigate to the right organization, if necessary, and click "sync" if the repository was created recently.
- Enable the repository by clicking on the checkbox next to it.
- Push a commit to your repository to start a build.

Next, set up the environment variables used by the push-to-pantheon script.

Define the environment variables that identify your site in the **global** section of your .travis.yml **env**. See the comments in the file for instructions, especially for the encrypted environment variables and encrypted private key file. The encrypted items are only necessary if you want to push your site to Pantheon after every successful test run. You will need to set up your repository to be tested by Travis as shown above in order to encrypt your Travis API key.

You also need to set up an ssh key, so that the push-to-pantheon script can commit changes to the Pantheon git repository.

- [Create a public/private ssh key pair](https://help.github.com/articles/generating-ssh-keys/). You might want to use a different key than the one you use with GitHub.
- [Add the public ssh key to your Pantheon account](https://pantheon.io/docs/articles/users/loading-ssh-keys/).
- [Encrypt your private key for Travis](http://docs.travis-ci.com/user/encrypting-files/).
    - Name your private key `travis-ci-key`, and place it at the base of your project (this file is already in the starting .gitignore file).
    - Create your encrypted key with `cd travis && travis encrypt-file travis-ci-key`.
    - Copy the `openssl` line output by `travis encrypt-file` into your .travis.yml file, replacing the `openssl` line that already exists in the **after\_success** section.
    - Commit the generated travis-ci-key.enc and all changes to your .travis.yml file.

The other parts of the example .travis.yml file should run without modification. Note that the scripts run from the `bin` directory come from either the `scripts` directory of this project (which are copied to the `bin` directory when you require "pantheon-systems/travis-scripts" in your project's composer.json), or from some other component **require-dev** (e.g. behat).

See the [Travis CI documentation](http://docs.travis-ci.com/user/getting-started/) for instructions on how to set up GitHub integration, so that your code will be automatically tested on every commit.

#### Behat

[](#behat)

This sample is set up to run a single behat test that confirms that the name of the site was set correctly by `drush site-install`. Note that the first part of the site name is set by the `SITE_NAME` environment variable that you customize in your .travis.yml file; the second part of the site name is set to `Travis Test Site` on Travis, and `Pantheon Test Site` on Pantheon.

See the [behat documentation](http://docs.behat.org/en/latest/) for further instructions on adding more tests to your project.

Local Testing
-------------

[](#local-testing)

Once setup is complete, doing local testing is a simple matter of:

```
$ composer install
$ ./bin/local-test

```

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

28

Last Release

3940d ago

Major Versions

0.1.4 → 1.0.02015-06-16

### Community

Maintainers

![](https://www.gravatar.com/avatar/b34cc6bd882277b6c6dda19bf6631ae5c3a909fd667c826a15121642cdc051b2?d=identicon)[greg.1.anderson](/maintainers/greg.1.anderson)

![](https://www.gravatar.com/avatar/5a89f5f15357797cbd6ec7833a28626478ae3c0ceb5fa1faa8a26d0960584c65?d=identicon)[pantheon-systems](/maintainers/pantheon-systems)

---

Top Contributors

[![greg-1-anderson](https://avatars.githubusercontent.com/u/612191?v=4)](https://github.com/greg-1-anderson "greg-1-anderson (62 commits)")

### Embed Badge

![Health badge](/badges/pantheon-systems-travis-scripts/health.svg)

```
[![Health](https://phpackages.com/badges/pantheon-systems-travis-scripts/health.svg)](https://phpackages.com/packages/pantheon-systems-travis-scripts)
```

###  Alternatives

[deployer/deployer

Deployment Tool

11.1k25.4M207](/packages/deployer-deployer)[appwrite/server-ce

End to end backend server for frontend and mobile apps.

55.3k84.2k](/packages/appwrite-server-ce)[pragmarx/health

Laravel Server &amp; App Health Monitor and Notifier

2.0k1.0M2](/packages/pragmarx-health)[felixfbecker/language-server-protocol

PHP classes for the Language Server Protocol

22476.7M6](/packages/felixfbecker-language-server-protocol)[heroku/heroku-buildpack-php

Toolkit for starting a PHP application locally, with or without foreman, using the same config for PHP and Apache2/Nginx as on Heroku

8161.3M10](/packages/heroku-heroku-buildpack-php)[tiamo/phpas2

PHPAS2 is a php-based implementation of the EDIINT AS2 standard

4674.7k](/packages/tiamo-phpas2)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
