Adding TravisCI and EPV to Extesions

A place to discuss Extensions Development
Post Reply
User avatar
bonelifer
Administrator
Administrator
Posts: 476
Joined: 24 Jun 2006, 17:48
Real name: William
Location: htpc.MythBuntu

Adding TravisCI and EPV to Extesions

Post by bonelifer »

pre-step:

Code: Select all

clone "phpbb-ext-acme-demo" from Github for the files listed below in step two.
git clone https://github.com/nickvergessen/phpbb-ext-acme-demo

  1. Go to Travis Accounts, Sync the list of repositories, Enable your extensions repository
  2. Copy the following files to your extension:
    travis/prepare-phpbb.sh
    .travis.yml
    phpunit.xml.dist
  3. Edit .travis.yml
    find:
    - EXTNAME="acme/demo" # CHANGE name of the extension HERE
    replace with:
    - EXTNAME="yourvendor/yourextension"
    Example:
    - EXTNAME="phpbbmodders/holidayflare"
  4. After that, include in your composer.json EPV as development dependency:
    "require-dev": {
    "phpbb/epv": "dev-master"
    },
  5. Add the TravisCI badge to the README.md file:
    [![Build Status](https://travis-ci.org/phpbbmodders/holiday_flare.png)](https://travis-ci.org/phpbbmodders/holiday_flare)
  6. Install Composer (Run while in the repos folder)
    curl -sS https://getcomposer.org/installer | php
  7. Update your Composer dependencies for EPV (Run while in the repos folder)
    php composer.phar update --dev
  8. Add the vendor folder to your .gitignore file

    Code: Select all

    # Do not submit the VENDOR folder
    vendor/*

  9. Commit via CLI on Linux so that the third command here sticks. TortoiseGIT in windows won't be able to see the mode change one the file and Travis won't have the permissions needed to run prepare-phpbb.sh. This means any TravisCI enabled repo can't be altered via Windows.
    git add .
    git commit -m "Add TravisCI integration for EPV and TravisCI badge to README.md"
    git update-index --chmod=+x travis/prepare-phpbb.sh
    git push

Instructions got from this topic on phpbb.com [url=https://www.phpbb.com/community/viewtopic.php?f=461&t=2239116]Simple way to test your ext on TravisCI[/url] and cleaned up to be more step by step.
Post Reply