how I ride the bullet - how I set up a testing environment

Discussions and requests related to new CMSimple features, plugins, templates etc. and how to develop.
Please don't ask for support at this forums!
cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: how I ride the bullet - how I set up a testing environme

Post by cmb » Tue Jan 20, 2015 5:15 pm

cmb wrote:To be honest I had installed JSDoc 3.2.2 manually quite a while ago. For the article Development Environment I had chosen to use Node.js for JSDoc 3 to avoid this manual installation and requiring Java. I presumed that the installation would be easier, but had not tried it.

Now I did. It is not necessary to use the node.js command prompt; a standard cmd.exe is sufficient (however, the installation folder of node.js has to be in the PATH). CD to the XH working copy and run:

Code: Select all

npm install jsdoc@"<=3.3.0"
set path=node_modules\.bin;%PATH%
phing js-doc
The first command creates the folder node_modules, which is then added to the PATH. The last command should create the JS documentation in doc/js/.

If we agree on the local installation, we should ignore the node_module folder (i.e. set the respective SVN property), and I'll add some explanations to the Wiki article.
In the meantime I learned that npm modules can be installed globally with the -g flag. That might be preferable, at least as long as we need no further Node modules.
Christoph M. Becker – Plugins for CMSimple_XH

manu
Posts: 1085
Joined: Wed Jun 04, 2008 12:05 pm
Location: St. Gallen - Schweiz
Contact:

Re: how I ride the bullet - how I set up a testing environment

Post by manu » Sat Jan 18, 2020 10:40 am

Wie ich erfahre, werden zahlreiche Test und wohl auch die builds neuerding auf Github mit Travis CI ausgeführt. Damit sind die Angaben in unserem Wiki wohl nicht mehr aktuell.
Es stellen sich folgende Fragen:
  • Welche Installationen braucht ein Publisher noch Client seitig?
  • Wo ist der Workflow mittels travis CI dokumentiert? Wie werden diese Aktionen ausgelöst?
Ziel ist es, im Wiki das Thema "Entwicklungsumgebung" auf den aktuellen Stand zu bringen.

******************

As I learn, numerous tests and probably the builds on Github are carried out with Travis CI. This means that the information in our wiki is no longer up to date.
The following questions arise:
  • Which installations does a publisher still need on the client side?
  • Where is the workflow documented using travis CI? How are these actions triggered?
The aim is to bring the topic "development environment" up to date in the wiki.

manu
Posts: 1085
Joined: Wed Jun 04, 2008 12:05 pm
Location: St. Gallen - Schweiz
Contact:

Re: how I ride the bullet - how I set up a testing environment

Post by manu » Thu Jan 30, 2020 12:51 pm

Update:
to install Composer and its depencies globally in Windows:
  • install Composer
  • copy CMSimpleRoot/composer.json to %APPDATA%\Composer
  • execute on command line

    Code: Select all

    composer global install
  • add to your PATH: %APPDATA%\Composer\vendor\bin

manu
Posts: 1085
Joined: Wed Jun 04, 2008 12:05 pm
Location: St. Gallen - Schweiz
Contact:

Re: how I ride the bullet - how I set up a testing environment

Post by manu » Sun Jul 26, 2020 12:01 pm

Global install: Soweit so gut. Aber der

Code: Select all

phing coverage
will mir nicht gelingen:
Could not open file C:\xampp\htdocs\CMSimpleGit\vendor\phpunit\phpunit\phpunit
Ich habe meinen System path mit

Code: Select all

C:\Users\emanuel\AppData\Roaming\Composer
ergänzt. Aber es geht immer noch nicht.
Any ideas?

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: how I ride the bullet - how I set up a testing environment

Post by cmb » Sun Jul 26, 2020 1:17 pm

Probier mal:

Code: Select all

path vendor\bin;%PATH%
Müsste dann eigentlich funktionieren.

PS: nö. Anscheinend hast du bei der Installation der Composer-Pakete eine globale Installation durchgeführt. Allerdings geht das Build-Script von einer lokalen Installation in C:\xampp\htdocs\CMSimpleGit\vendor aus. Man könnte nun das Build-Script anpassen, aber was spricht gegen eine lokale Installation?
Christoph M. Becker – Plugins for CMSimple_XH

manu
Posts: 1085
Joined: Wed Jun 04, 2008 12:05 pm
Location: St. Gallen - Schweiz
Contact:

Re: how I ride the bullet - how I set up a testing environment

Post by manu » Sun Jul 26, 2020 2:34 pm

cmb wrote:
Sun Jul 26, 2020 1:17 pm
... Man könnte nun das Build-Script anpassen, aber was spricht gegen eine lokale Installation?
Ich wollte eigentlich das vendor Verzeichnis ausserhalb meiner GitHub instanz haben..

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: how I ride the bullet - how I set up a testing environment

Post by cmb » Sun Jul 26, 2020 3:18 pm

manu wrote:
Sun Jul 26, 2020 2:34 pm
Ich wollte eigentlich das vendor Verzeichnis ausserhalb meiner GitHub instanz haben..
Ist bei mir gerade andersherum, weil ich sonst immer wieder Konflikte mit anderen PHP-Versionen und Projekten habe. Aber hast du mal versucht, das externe Verzeichnis zu symlinken, also etwa:

Code: Select all

mklink /d vendor C:\Users\emanuel\AppData\Roaming\Composer
(muss als Admin ausgeführt werden)

Allgemein ist aber `phing coverage` nicht richtig gelöst, eben weil phpdbg als Code-Coverage-Driver verwendet wird. War seinerzeit nötig, weil die Performance von Xdebug grausig war; da hat sich wohl viel getan, so dass man das im Prinzip versuchen könnte (gibt aber wohl Probleme mit uopz). Oder halt mal pcov versuchen (ist aber nur für PHP 7, und wird vermutlich von älteren PHPUnit-Versionen nicht unterstützt).
Christoph M. Becker – Plugins for CMSimple_XH

manu
Posts: 1085
Joined: Wed Jun 04, 2008 12:05 pm
Location: St. Gallen - Schweiz
Contact:

Re: how I ride the bullet - how I set up a testing environment

Post by manu » Sun Jul 26, 2020 3:25 pm

Nein, eigentlich möchte ich ganz lehrbuchmässig vorgehen, resp. gemäss Anleitung. Kann ich denn dieses vendor Verzeichnis halten ohne dass es sich mit meiner Github Instanz beisst?

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: how I ride the bullet - how I set up a testing environment

Post by cmb » Sun Jul 26, 2020 4:39 pm

manu wrote:
Sun Jul 26, 2020 3:25 pm
Nein, eigentlich möchte ich ganz lehrbuchmässig vorgehen, resp. gemäss Anleitung. Kann ich denn dieses vendor Verzeichnis halten ohne dass es sich mit meiner Github Instanz beisst?
Ja, denn es wird von Git ignoriert. :)
Christoph M. Becker – Plugins for CMSimple_XH

manu
Posts: 1085
Joined: Wed Jun 04, 2008 12:05 pm
Location: St. Gallen - Schweiz
Contact:

Re: how I ride the bullet - how I set up a testing environment

Post by manu » Mon Jul 27, 2020 10:43 am

ah ja klar. Habe jetzt alles auf local zurückgemodelt.
Wie entferne ich den global composer install? %APPDATA%\Composer\vendor und das dortige composer.json löschen?

Diese Tests machen Probleme:

Code: Select all

PS C:\xampp\htdocs\CMSimpleGit> phing phan                                                                              Buildfile: C:\xampp\htdocs\CMSimpleGit\build.xml

CMSimple_XH > phan:

Der Befehl "phan" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.

BUILD FAILED
C:\xampp\htdocs\CMSimpleGit\build.xml:52:96: Task exited with code 1

Total time: 0.7034 seconds

PS C:\xampp\htdocs\CMSimpleGit> phing attack-tests                                                                      Buildfile: C:\xampp\htdocs\CMSimpleGit\build.xml

CMSimple_XH > attack-tests:

PHPUnit 3.7.21 by Sebastian Bergmann.

Cannot open file "tests/bootstrap.php".


BUILD FAILED
C:\xampp\htdocs\CMSimpleGit\build.xml:70:112: Task exited with code 1

Total time: 0.7753 seconds

PS C:\xampp\htdocs\CMSimpleGit> phing validation-tests                                                                  Buildfile: C:\xampp\htdocs\CMSimpleGit\build.xml

CMSimple_XH > validation-tests:

PHPUnit 3.7.21 by Sebastian Bergmann.

Cannot open file "tests/bootstrap.php".


BUILD FAILED
C:\xampp\htdocs\CMSimpleGit\build.xml:65:116: Task exited with code 1

Total time: 0.7789 seconds

PS C:\xampp\htdocs\CMSimpleGit>  
Kannst Du Dir da, Christoph, einen Reim drauf machen?

Post Reply