-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Travis CI tests not running #375
Comments
It was, indeed, simple to migrate from travis-ci.org to travis-ci.com. But that was only the start of things. It was using an out of date linux image with out of date versions of postgresql and php. Tests are now running again with PHP7.3. PHP8 is a problem I am still investigating. Travis now charge for their service but we are getting by on an initial free credit of 10000 units. As an open source project, we can request a monthly allowance of free credits. If this is not forthcoming, Github now have their own system we can use to replace Travis. |
This has turned in to a lot more work than I was expecting. Our unit testing had been tied to PHPUnit v5. This is no longer supported and is listed as compatible with PHP only up to v7.1. I updated to the latest version of PHPUnit (v9 currently) but this necessitated updates to all our test classes. Moreover, our tests had a dependency on DbUnit which has been abandoned. I have switched to a fork of this which is being maintained but is only compatible with PHP up to v7.4 currently. That is to say, more work is required for supporting tests with PHP8. When updating all the test classes, to allow the unit tests to run locally, I have created a Docker environment to mimic that used by Travis CI. This can be invoked by |
I put in a request to Travis for a free open-source subscription. They responded very quickly with the following:
We use the GNU General Public Licence which is approved by the Open Source Initiative as meeting the specification so I will confirm we meet all the requirements. |
Travis have accepted our application for open source credits and kindly made us a donation.
To monitor our consumption, see https://travis-ci.com/organizations/Indicia-Team/plan |
Is it possible to limit Travis so it only runs on certain pushes? It might be overkill to use credits unless changes are significant, or the build is approaching a release? |
Good idea. Easy to limit by branch - https://docs.travis-ci.com/user/customizing-the-build#building-specific-branches How about we limit it to pushes to dev and master? I think everyone is in good habits of working in branches and we don't want to inhibit frequent commits/pushes. |
I'm probably not always using branches as I should be, but if this is an incentive to always work on a feature branch then that's a good thing... |
Now limited to commits to master and develop branches and to pull requests. The latter took me by surprise but may be helpful. There is a setting in https://app.travis-ci.com/github/Indicia-Team/warehouse/settings for it. |
I don't have permissions to view the settings. Does this mean that if I do a release, I have to do a pull request to merge develop into master in order to trigger the build? Normally I just do a merge, using --no-commit at first so I can review all the changes. |
@johnvanbreda you don't need a separate permission for that. it is basically same as this link -> https://travis-ci.com/github/Indicia-Team/warehouse/settings. you just need to login using your github authentication |
I was expecting Travis to behave as Biren says. My assumption was that if you authenticate with Github, then being an admin in Github would make you an admin in Travis. If that was fantasy on my part and it doesn't work for you, @johnvanbreda, then I'll have to dig a little deeper. A build will be triggered whenever you push a commit to develop or master (if I've done it right - haven't actually tried it on master). I'm not expecting you to have to change your release process at all. In addition, a push to a branch which is the subject off a pull request also triggers a build. I left this option on because I thought it would be helpful Obviously if we never get a merge request it is neither here nor there! |
It's OK - I was allowed in, I hadn't spotted my session had logged out in Travis. |
Now that I've fixed a problem in the test suite I note that the develop branch is now building, and I'd expect the master to do the same once your work is merged across. https://app.travis-ci.com/github/Indicia-Team/warehouse/branches |
If you follow the 'build passing' link on https://github.com/Indicia-Team/warehouse to https://travis-ci.org/Indicia-Team/warehouse there is a message saying
It indicates that our tests have not run for 3 months. Hopefully it will be a simple matter to switch from one to the other. I'll try it out.
The text was updated successfully, but these errors were encountered: