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

Drone CI #26

Merged
merged 17 commits into from Jun 15, 2023
Merged

Drone CI #26

merged 17 commits into from Jun 15, 2023

Conversation

phil-davis
Copy link
Contributor

@phil-davis phil-davis commented Jun 15, 2023

Issue #21

I did the following things:

  • committed the "standard" .drone.star that has all the "bells-and-whistles" used in CI for the oC10 apps. That gives flexibility to run whatever parts are wanted (code-style, phpunit, phan, phpstan...). And if stuff is fixed or enhanced in the "standard" .drone.star then the changes can be "mindlessly" applied the same here. (It gets annoying when some repos have different starlark code, and someone has to keep thinking about how to apply changes)
  • enabled owncloud code-style v4 and committed the changes (it made format changes, and some public constant declarations)
  • enabled phpunit - some of the unit tests need xdebug, so I adjusted .drone.star so that it installs php7.4-xdebug in the unit test pipeline. It uses its own locally-selected version of phpunit. The CI uses phpunit 9.6 with PHP 7.4. That decouples it from the unneeded core (many of the oC10 apps just run whatever phpunit version comes with core, we don't want to be hitched to that!)
  • CI pipelines are run with PHP 7.4

Do we want the code-style changes? (if not, I can remove those and not run code-style in CI)

Do we want to still support PHP 7.1 and up? Or drop the older PHP versions?

ToDo: sort out the unnecessary CI pipeline steps that install core... - this is not actually an oC10 app but I have used the "oC10 app" starlark code as an easy "template"

.phpunit.result.cache Outdated Show resolved Hide resolved
@DeepDiver1975
Copy link
Member

You can fully drop all the steps regarding:

  • install owncloud server
  • install and test with different databases

This is just a tiny library - no owncloud app. see the travis.yaml as reference.

@phil-davis
Copy link
Contributor Author

Yes, I pasted in the "standard" .drone.star. I will have a look at what to clean up when I get it running and passing.

@phil-davis phil-davis changed the title [WIP] Drone CI Drone CI Jun 15, 2023
Copy link
Member

@DeepDiver1975 DeepDiver1975 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drop the databases -

@phil-davis
Copy link
Contributor Author

drop the databases -

done - yes, that made no sense at all

@DeepDiver1975
Copy link
Member

mind adding php 8.0 and 8.1?

also having sqlite in the step name feels just wrong ...

@DeepDiver1975
Copy link
Member

and there is still a step called install core

@DeepDiver1975
Copy link
Member

also a step setup-server-* is not neccessary

@phil-davis
Copy link
Contributor Author

OK - I need to get rid of all the pieces related to core. I will have to cleanup all the logic of .drone.star so that it does not have all the "accidental" core stuff. We will have a custom cut-down .drone.star

@DeepDiver1975
Copy link
Member

I can help out to make the code php8+ ready if you like..... In case there is anything to be done.

Thanks a lot so far....

@phil-davis
Copy link
Contributor Author

https://drone.owncloud.com/owncloud/TarStreamer/14/5/4
"This version of ownCloud is not compatible with PHP 8.0"

I really do need to get rid of anything that tries to use core!

@phil-davis
Copy link
Contributor Author

@DeepDiver1975 I cleaned up a lot of the excess drone starlark.

I can easily enable phan and/or phpstan later if needed.

unit tests pass on PHP 7.4 8.0 8.1

anything else needed for this "first pass" at getting it going?

If this seems enough to get started, then I will squash some of the related commits together and then merge.

@DeepDiver1975
Copy link
Member

Always interesting to see how an easy travis.yaml with 22 lines explodes into a 800+ lines drone ci file 🙈

anyway 👍

@DeepDiver1975 DeepDiver1975 merged commit 23452d1 into master Jun 15, 2023
1 check passed
@delete-merged-branch delete-merged-branch bot deleted the drone-ci branch June 15, 2023 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants