Skip to content

Instantly share code, notes, and snippets.

@h4cc
Last active March 10, 2018 05:01
Show Gist options
  • Save h4cc/9141671 to your computer and use it in GitHub Desktop.
Save h4cc/9141671 to your computer and use it in GitHub Desktop.
HHVM Travis-Ci template as allowed failure.
language: php
php:
- 5.3
- 5.4
- 5.5
- 5.6
- hhvm
matrix:
allow_failures:
- php: hhvm
before_script:
- travis_retry composer self-update
- travis_retry composer --prefer-source --dev install
script:
- phpunit --coverage-text tests
@photodude
Copy link

photodude commented Nov 18, 2016

Using - hhvm only tests against the EOL hhvm 3.6.6 version

The code below provides the current HHVM version (3.15.2 as of this comment) and will track with each release (i.e. will be 3.16 when 3.16 is released).

If testing against HHVM LST versions is desired follow this guide. https://docs.travis-ci.com/user/languages/php#HHVM-versions

Should be able to change to container based Trusty after Q1-17 https://blog.travis-ci.com/2016-11-08-trusty-container-public-beta/

# faster builds on new travis setup not using sudo
sudo: false
language: php

php:
  - 5.4
  - 5.5
  - 5.6
  - 7.0
  - 7.1

matrix:
  fast_finish: true
  include:
    # test against the latest HHVM version by using trusty
    - php: hhvm
      sudo: true
      dist: trusty
      group: edge # Use edge image until the next travis CI image update
      addons:
        apt:
          packages:
            - mysql-server-5.6
            - mysql-client-core-5.6
            - mysql-client-5.6
      services:
        - mysql
  allow_failures:
    - php: hhvm

before_script:
    - travis_retry composer self-update
    - travis_retry composer --prefer-source --dev install

script:
    - phpunit --coverage-text tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment