mikestreety,
@mikestreety@hachyderm.io avatar

Managed to get Gitlab running PHP unit tests.

All the examples get you to copy a bash file and install dependencies in each run (e.g. https://docs.gitlab.com/ee/ci/examples/php.html#test-php-projects-using-the-docker-executor) so I made a Docker image with them pre-built.

Took job down from 45 seconds to ~3 seconds.

The docker images are open source:

https://github.com/liquidlight/docker-php-testing

(Yes the docs need updating...)

mikestreety,
@mikestreety@hachyderm.io avatar

Off the back of this, I was actually made aware of specific docker images for doing this:

https://hub.docker.com/search?q=typo3%2Fcore-testing-php

jaygooby,
@jaygooby@mastodon.social avatar

@mikestreety I’ve started a repo on our gitlab server that holds, and can build via CI, all the custom docker images we need for testing our other repos 💪

mikestreety,
@mikestreety@hachyderm.io avatar

@jaygooby nice. Would be interested to see that.

thiagocsf,
@thiagocsf@techhub.social avatar

@mikestreety both of these are used internally at GitLab:

  1. https://gitlab.com/gitlab-org/gitlab-build-images
  2. https://gitlab.com/gitlab-org/security-products/dependencies/build-images

The first one is more complex but also flexible. The second one is very straightforward, but only does simpler image builds.

Both use scheduled pipelines to keep images up-to-date.

mikestreety,
@mikestreety@hachyderm.io avatar

@thiagocsf oh thanks. I'll have a dig and see if they have one that does the job

  • All
  • Subscribed
  • Moderated
  • Favorites
  • php
  • ngwrru68w68
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • megavids
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • provamag3
  • JUstTest
  • All magazines