Skip to content
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

Adds Travis CI support #78

Merged
merged 4 commits into from Oct 23, 2019

Conversation

@corazzi
Copy link
Contributor

corazzi commented Oct 23, 2019

This PR adds a Travis CI build configuration to the project.

It will create a boot up an Apache instance and create a MySQL database using the database dumps provided in the project.

As per the installation instructions, a timezone is required, so one will be set using build/zookeeper.ini.

The final step of the build will run the zk executable with two test arguments to ensure that the page can be loaded and the executable runs without failure.

Whilst establishing the script portion of the build, I came across a few small issues that required fixing. None of the changes are breaking changes (i.e., backwards-incompatible), they are merely oversights or changes that make testing a bit easier. If any clarification is needed on the changes, I'll be happy to explain.

The builds will run on both PHP 5.6 and 7.2.

Here are links to 3 separate successful builds:

https://travis-ci.org/corazzi/zookeeper/builds/601803948
https://travis-ci.org/corazzi/zookeeper/builds/601804961
https://travis-ci.org/corazzi/zookeeper/builds/601806713

Satisfies #10

@RocketMan

This comment has been minimized.

Copy link
Owner

RocketMan commented Oct 23, 2019

@corazzi Sacha, thank you for adding Travis CI support to zookeeper! It is something that we have wanted for some time; your contribution is most appreciated.

I have a question about the schema change (tracks.created column is changed from timestamp to datetime)... what is the motivation for that, and is there any implication for Travis CI if we do not make that change?

Once again, thank you Sacha for this excellent contribution!

@corazzi

This comment has been minimized.

Copy link
Contributor Author

corazzi commented Oct 23, 2019

@RocketMan I'm glad you're happy with the contribution, Jim!

When I was importing the zkdbSchema.sql file in Travis (and in my local environment), MySQL was failing with

ERROR 1067 (42000) at line 359: Invalid default value

(which you can see in this build) because NULL isn't a valid default for timestamp columns.

In hindsight, I should have just changed the default to CURRENT_TIMESTAMP instead of changing the entire column type – which I have just done, and it still passes.

Hope that helps! 😄

@RocketMan

This comment has been minimized.

Copy link
Owner

RocketMan commented Oct 23, 2019

Ah, thanks Sacha, good catch. It should actually be created timestamp null default null.

@corazzi

This comment has been minimized.

Copy link
Contributor Author

corazzi commented Oct 23, 2019

Ah so you're right! I've changed it to that, instead.

@RocketMan RocketMan merged commit 39f083d into RocketMan:master Oct 23, 2019
@corazzi corazzi deleted the corazzi:feature/travis-support branch Oct 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.