Simple way to test your ext on TravisCI

Discussion forum for Extension Writers regarding Extension Development.
User avatar
nickvergessen
Former Team Member
Posts: 4397
Joined: Mon Apr 30, 2007 5:33 pm
Location: Stuttgart, Germany
Name: Joas Schilling
Contact:

Re: Simple way to test your ext on TravisCI

Post by nickvergessen »

Wolfsblvt wrote:What kind of script if I may ask?
That would be interesting for me too.
I use phing (just like phpBB aswell).
It is also able to setup the composer dependencies https://github.com/nickvergessen/phpbb- ... /issues/90
but on the other hand deletes the unnecessary files from it, aswell as the extension itself.
The build file looks like this build.xml.
In the end you only need phing set up as a require-dev dependency in the composer.json of your extension.

Sounds complicated right now, but I will post it more detailed and with explanations soon.
bonelifer wrote:On Github you could use a .gitattributes file and then use git-archive
Well this only works, until you don't have to set up composer deps
No Support via PM
User avatar
nickvergessen
Former Team Member
Posts: 4397
Joined: Mon Apr 30, 2007 5:33 pm
Location: Stuttgart, Germany
Name: Joas Schilling
Contact:

Re: Simple way to test your ext on TravisCI

Post by nickvergessen »

If your tests fail, see viewtopic.php?f=461&t=2298031
No Support via PM
User avatar
Kailey
Community Team Leader
Community Team Leader
Posts: 3732
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Snay
Contact:

Re: Simple way to test your ext on TravisCI

Post by Kailey »

Paul wrote:After that, you should create your composer.lock file by running

Code: Select all

composer.phar update --dev

(If you don't have composer.phar yet:

Code: Select all

curl -sS https://getcomposer.org/installer | php
How do I run this on Windows? I have a Windows machine that I can do extension development but am NOT allowed to install PHP on. I just want to be able to add EPV to my travis testing.
Kailey Snay - Community Team Leader
Knowledge Base | Documentation | Community rules

If you have any questions about the rules/customs of this website, feel free to send me a PM.
User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 18316
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: Simple way to test your ext on TravisCI

Post by DavidIQ »

You're going to need PHP on there for composer to do its thing. You don't need to install PHP however. You can just use something like XAMPP which comes with PHP. Check our list out here under "Local Servers" for some other options. Once you've got that going I'd go with the Windows Setup of Composer as it would probably make it easier to run it by right-clicking and selecting "Use Composer here".
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.
User avatar
Kailey
Community Team Leader
Community Team Leader
Posts: 3732
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Snay
Contact:

Re: Simple way to test your ext on TravisCI

Post by Kailey »

DavidIQ wrote:You're going to need PHP on there for composer to do its thing. You don't need to install PHP however. You can just use something like XAMPP which comes with PHP. Check our list out here under "Local Servers" for some other options.
Yeah, I'm quite versed in the local servers options. I was trying to avoid this route as I have a VM that I use as a development server.
DavidIQ wrote:Once you've got that going I'd go with the Windows Setup of Composer as it would probably make it easier to run it by right-clicking and selecting "Use Composer here".
If I install my favorite local server, can't I just follow the install instructions Paul gave? If not, then what's the point of going through this entire process? :?
Kailey Snay - Community Team Leader
Knowledge Base | Documentation | Community rules

If you have any questions about the rules/customs of this website, feel free to send me a PM.
User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 18316
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: Simple way to test your ext on TravisCI

Post by DavidIQ »

Sure you can follow his instructions. If you're just looking for the Windows equivalent of the commands he gave then that's also on the Composer installation page:

Code: Select all

C:\Users\username>cd C:\bin
C:\bin>php -r "readfile('https://getcomposer.org/installer');" | php
C:\bin>echo @php "%~dp0composer.phar" %*>composer.bat
You'll need to know the path to the PHP executable or have it in the environment variables.
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.
User avatar
Kailey
Community Team Leader
Community Team Leader
Posts: 3732
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Snay
Contact:

Re: Simple way to test your ext on TravisCI

Post by Kailey »

Awesome, thanks! :D
Kailey Snay - Community Team Leader
Knowledge Base | Documentation | Community rules

If you have any questions about the rules/customs of this website, feel free to send me a PM.
User avatar
Kailey
Community Team Leader
Community Team Leader
Posts: 3732
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Snay
Contact:

Re: Simple way to test your ext on TravisCI

Post by Kailey »

I must be doing something wrong. When I run composer.phar update --dev, Windows asks me how I want to open this type of file and no composer.lock file is created in my extension directory. I used the Windows installer and used the "Use composer here" option.

*EDIT: Nevermind, it should have been composer update --dev
Kailey Snay - Community Team Leader
Knowledge Base | Documentation | Community rules

If you have any questions about the rules/customs of this website, feel free to send me a PM.
combuster
Registered User
Posts: 352
Joined: Sun Oct 26, 2008 11:58 pm

Re: Simple way to test your ext on TravisCI

Post by combuster »

Note that since some weeks travis requires to explicitly request sudo usage and the provided .travis.yml would not be able to execute setup-phpbb.sh. (e.g., see this failing build: https://travis-ci.org/RobertHeim/phpbb- ... 08054#L181 )

To fix this add the following line in .travis.yml:

Code: Select all

sudo: required
I made a pull request: https://github.com/nickvergessen/phpbb- ... mo/pull/24

see also: http://docs.travis-ci.com/user/build-co ... -Using-apt
User avatar
RMcGirr83
Former Team Member
Posts: 22016
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Simple way to test your ext on TravisCI

Post by RMcGirr83 »

Travis is having all kinds of issues lately and it's annoying. For example
Err http://us-central1.gce.archive.ubuntu.com precise-updates/multiverse amd64 Packages

403 Forbidden [IP: 199.223.234.73 80]
starting to think it's not even worth using it going forward.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
User avatar
bonelifer
Community Team Member
Community Team Member
Posts: 3542
Joined: Wed Oct 27, 2004 11:35 pm
Name: William
Contact:

Re: Simple way to test your ext on TravisCI

Post by bonelifer »

To be fair that's the Ubunu mirror blocking.
William Jacoby - Community Team
Knowledge Base | phpBB Board Rules | Search Customisation Database
Please don't contact me via PM or email for phpBB support .
User avatar
RMcGirr83
Former Team Member
Posts: 22016
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Simple way to test your ext on TravisCI

Post by RMcGirr83 »

They have moved to cloud and I know it is an Ubuntu mirror (gce) blocking but it's still annoying as heck.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
emmea90
Registered User
Posts: 23
Joined: Sat Jan 17, 2009 4:35 pm
Contact:

Re: Simple way to test your ext on TravisCI

Post by emmea90 »

Hi.

Great work, i discovered recently travis and used to test my extension.

I see that icc profile sniffer failed on my extensions in the first build. How does this test work?
Satanasov
Registered User
Posts: 1310
Joined: Sun Jul 29, 2012 5:48 am
Name: Stanislav Atanasov
Contact:

Re: Simple way to test your ext on TravisCI

Post by Satanasov »

As much as I know - the test checks images that you use for ICC profiles (https://en.wikipedia.org/wiki/ICC_profile). I had that issue with one of my extensions. There is GD2 function that removes this info from the images.
For list of all my extensions go to https://github.com/satanasov
If you want custom functions in some of my products - PM me and we will discuss it.
emmea90
Registered User
Posts: 23
Joined: Sat Jan 17, 2009 4:35 pm
Contact:

Re: Simple way to test your ext on TravisCI

Post by emmea90 »

Satanasov wrote:As much as I know - the test checks images that you use for ICC profiles (https://en.wikipedia.org/wiki/ICC_profile). I had that issue with one of my extensions. There is GD2 function that removes this info from the images.
So it's tested on image themselves or on their calls in php functions?
Post Reply

Return to “Extension Writers Discussion”