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 » Fri Jan 30, 2015 12:15 am

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 » Tue Feb 17, 2015 7:11 pm

If your tests fail, see viewtopic.php?f=461&t=2298031
No Support via PM

User avatar
kinerity
Community Team Member
Community Team Member
Posts: 2330
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Truscott
Contact:

Re: Simple way to test your ext on TravisCI

Post by kinerity » Wed Feb 25, 2015 1:23 am

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 Truscott - Community Team

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17052
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 » Wed Feb 25, 2015 2:20 am

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
kinerity
Community Team Member
Community Team Member
Posts: 2330
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Truscott
Contact:

Re: Simple way to test your ext on TravisCI

Post by kinerity » Wed Feb 25, 2015 4:12 am

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 Truscott - Community Team

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17052
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 » Wed Feb 25, 2015 4:27 am

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
kinerity
Community Team Member
Community Team Member
Posts: 2330
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Truscott
Contact:

Re: Simple way to test your ext on TravisCI

Post by kinerity » Wed Feb 25, 2015 4:29 am

Awesome, thanks! :D
Kailey Truscott - Community Team

User avatar
kinerity
Community Team Member
Community Team Member
Posts: 2330
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Truscott
Contact:

Re: Simple way to test your ext on TravisCI

Post by kinerity » Wed Feb 25, 2015 4:48 am

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 Truscott - Community Team

combuster
Registered User
Posts: 342
Joined: Sun Oct 26, 2008 11:58 pm

Re: Simple way to test your ext on TravisCI

Post by combuster » Fri May 22, 2015 9:26 pm

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
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Simple way to test your ext on TravisCI

Post by RMcGirr83 » Mon Dec 14, 2015 12:08 pm

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.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored

User avatar
bonelifer
Community Team Member
Community Team Member
Posts: 3473
Joined: Wed Oct 27, 2004 11:35 pm
Name: William
Contact:

Re: Simple way to test your ext on TravisCI

Post by bonelifer » Thu Dec 17, 2015 4:47 pm

To be fair that's the Ubunu mirror blocking.
Knowledge Base | phpBB Board Rules | Search Customisation Database
Image
Please don't contact me via PM or email for phpBB support .

User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Simple way to test your ext on TravisCI

Post by RMcGirr83 » Thu Dec 17, 2015 5:29 pm

They have moved to cloud and I know it is an Ubuntu mirror (gce) blocking but it's still annoying as heck.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored

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 » Tue Jan 19, 2016 2:30 pm

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: 1187
Joined: Sun Jul 29, 2012 5:48 am
Name: Stanislav Atanasov
Contact:

Re: Simple way to test your ext on TravisCI

Post by Satanasov » Tue Jan 19, 2016 3:20 pm

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 » Tue Jan 19, 2016 3:52 pm

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”