Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add basic support for Travis CI #39

Merged
merged 1 commit into from
Jan 20, 2020
Merged

Add basic support for Travis CI #39

merged 1 commit into from
Jan 20, 2020

Conversation

phansys
Copy link
Member

@phansys phansys commented Oct 31, 2017

Q A
Branch master
Bug fix? no
New feature? yes
BC breaks? yes
Deprecations? no
Tests pass? yes
Fixed tickets n/a
License MIT
Doc PR n/a

This PR is a work in progress, please do not merge yet.
For an example of CI result, see my build at https://travis-ci.org/phansys/PhpZabbixApi/builds/295154153.
I'm proposing to re-pack the build result into this repo, since it is intended to be used as an SDK for Zabbix API; so this library must act as a client independent from the Zabbix server / frontend.
The build will be kept as responsible of code generation, as you can see at the build matrix. The repo must have a branch in parallel with the Zabbix minor versions (2.0, 2.1, 2.2, ...) in order to guarantee BC while respecting semantic versioning.
This PR is based on 2.4 version, so the build matrix executes the tests against the first release (2.4.0) and against the latest release (2.4.8), in order to ensure there are no differences through patch releases. Please note this check is performed executing the build and confirming there are no differences with the existent code (with git diff).
In this PR the autoload mechanism was upgraded too, from classmap to psr-4.

TODO:

  • Add support for Travis CI and configuration to build the SDK based on the first and the latest Zabbix releases from the 2.4 branch (2.4.0 and 2.4.8);
  • Test the build with PHP 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4;
  • Add basic test suite with PHPUnit;
  • Update autoloading to leverage PSR-4;
  • Check the codebase and the generated code with PHP-CS-Fixer (PHP < 5.6 will miss this feature);
  • Define the strategy (how to keep ordered the versioning between this library and the related Zabbix versions) and where to publish the releases;

Please, be free to share any thoughts or comments.

@phansys
Copy link
Member Author

phansys commented Oct 31, 2017

Ping @domibarton, @chadmandoo. It would be great to have your feedback.

@phansys phansys changed the title [WIP] Add basic support for Travis CI Add basic support for Travis CI Jan 17, 2020
@phansys
Copy link
Member Author

phansys commented Jan 17, 2020

I think we can finally merge this PR as is, and let the missing features for other PR in order to keep the responsibilities separated (maybe some of them should wait for a next major).

/cc @domibarton, @ojgarciab, @nesies, @n4huel.

@ojgarciab
Copy link

ojgarciab commented Jan 20, 2020

We can't run tests against a running zabbix_sever instance, but we can simulate it (offline, without a running instance) with default SQL contents in a sqlite3 database.

The work is done in my own fork. I'll create a PR when this PR is merged.

Build Status
Work done (example): https://travis-ci.com/ojgarciab/PhpZabbixApi/builds/145219256

PS: continuous-integration/travis-ci/pr is deprecated since October 4th, 2018, you need to change it to Travis CI - Pull Request.

@phansys
Copy link
Member Author

phansys commented Jan 20, 2020

We can't run tests against a running zabbix_sever instance, but we can simulate it (offline, without a running instance) with default SQL contents in a sqlite3 database.

Great improvement!

About the Travis integration, I think we can wait for the automatic migration. At least, I didn't found a procedure to execute the migration for open source repos.

As of May 2, 2018 we are moving toward having repositories integrated via a GitHub App instead of GitHub Services which will no longer be supported by GitHub as of January 31st, 2019.

Note: While this process is ongoing, we have been migrating from GitHub services to webhooks on the https://travis-ci.org enabled repositories. The closure of GitHub services will not affect your repositories even if you are currently on .org.

@phansys phansys merged commit 2a1d4d9 into confirm:master Jan 20, 2020
@phansys phansys deleted the travis branch January 20, 2020 15:31
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants