Testing Yii2 on Gitpod

Hi everyone,

For those interested with testing on reproducible environnement, Yii2 is playing nice on Gitpod, here a quick example based on basic-project with a full testing stack (unit, functional, acceptance) including some fixtures to test with and a simple pipeline (for build & test) and code coverage generation.

You’ll be having a full env with root access, pre-configured docker image, mysql db, embedded browser and much more…

If you’re looking for a quick starting travis script you can use this example:

I hope everything is documented in README, if you want to know more aout Gitpod head over the docs on their website

Good luck!

2 Likes

@samdark How about integrating a default .gitpod.yml file in a newly Yii3 created app?

1 Like

Is gitpod a standard feature of gitlab?

1 Like

Well, I don’t think it’s a standard feature, however; it supports Github/Gitlab/Bitbucket with free (50hours/month) tier for open source projects, I think it’s better to start with default gitlab-ci.yml and a simple pipeline encouraging DevOps best practices?

Maybe but the thing is that there are way too many ways the project source code may be hosted:

  • Just a private git with Jenkins.
  • Just a private git with TeamCity.
  • GitHub with its actions.
  • GitLab with its pipelines.
  • Self-hosted GitLab.
  • BitBucket with its pipelines.
  • Any of these with TravisCI.
  • Any of these with CircleCI.
  • Any of these with Scrutinizer piplines.
  • etc.

Supporting all these is too much. Preferring one we don’t actually use (our code is at GitHub and uses its pipelines) isn’t a good idea as well.

1 Like

Agree, since there is no standard for now, I suggest to stick to the most used as the default one, based on the current market share:
cloud-host-provider-market-share
Original source: What is the best git repository service - GitHub, gitlab, Bitbucket or some other? - Quora
The other options could be optional arguments when creating a new app, something defaults to: --source-host=github [ --ci=travis-ci ], encouraging good practice in the ecosystem (plugins, modules…), for longer LTS and community engagement, of course if that fits with the roadmap of Yii3 and the available community effort?

It’s OK to have examples as wiki articles at least. Here: Wiki | Yii PHP Framework

1 Like