Преглед на файлове

Squashed commit of the following:

commit 6d5919fa17dba42c45bc45a6e02a9e9aec61c6a0
Author: Olivier Massot <olivier.massot@2iopenservice.fr>
Date:   Thu Nov 25 17:41:09 2021 +0100

	quiet down composer

commit 160997f072e435506fbb70323ca3c78fa379dddf
Author: Olivier Massot <olivier.massot@2iopenservice.fr>
Date:   Thu Nov 25 17:38:52 2021 +0100

	udpate env for ci

commit 44cb2ea5a09b97f5784801d7add0d16091adf310
Author: Olivier Massot <olivier.massot@2iopenservice.fr>
Date:   Wed Nov 24 17:44:21 2021 +0100

	test ci

commit 6d153500eaae3c237bf9be6f38dcf98e71602f3e
Author: Olivier Massot <olivier.massot@2iopenservice.fr>
Date:   Wed Nov 24 17:41:52 2021 +0100

	fix ci

commit 7fd0dcb47e26b53a46a0e06bb2225415cb9cf631
Author: Olivier Massot <olivier.massot@2iopenservice.fr>
Date:   Wed Nov 24 17:23:30 2021 +0100

	test ci

commit 31e63e92fff27d9c971ba899c035f0c440e79ac1
Author: Olivier Massot <olivier.massot@2iopenservice.fr>
Date:   Wed Nov 24 17:12:58 2021 +0100

	test ci

commit d4cb0f3b2cf4eb1f7fbe0ada68a643feb73aa0d5
Author: Olivier Massot <olivier.massot@2iopenservice.fr>
Date:   Fri Nov 12 11:47:03 2021 +0100

	fix ci

commit 65c10daceed482265990ddc35a77423759a40f4f
Author: Olivier Massot <olivier.massot@2iopenservice.fr>
Date:   Fri Nov 12 11:25:39 2021 +0100

	fix CI

commit 74389eae33087ae437545fc3fb88060ad9f4214a
Author: Olivier Massot <olivier.massot@2iopenservice.fr>
Date:   Wed Nov 10 17:44:03 2021 +0100

	debug CI

commit bcb572c25092089c00b2ded0b1d9801027b9383a
Author: Olivier Massot <olivier.massot@2iopenservice.fr>
Date:   Wed Nov 10 17:30:12 2021 +0100

	debug CI

commit 7784ca9f3e52376c60599c8c926e815baff47e17
Author: Olivier Massot <olivier.massot@2iopenservice.fr>
Date:   Wed Nov 10 17:00:41 2021 +0100

	fix ci

commit 7d483b6fb497efdf0f9c0297711daade9036b1d3
Author: Olivier Massot <olivier.massot@2iopenservice.fr>
Date:   Wed Nov 10 16:57:44 2021 +0100

	add coverage to phpunit conf

commit a92fec28a707204e033b19aa90e0f9729f1fe673
Author: Olivier Massot <olivier.massot@2iopenservice.fr>
Date:   Wed Nov 10 16:10:17 2021 +0100

	fix CI
Olivier Massot преди 4 години
родител
ревизия
487763a6ae
променени са 6 файла, в които са добавени 264 реда и са изтрити 198 реда
  1. 28 0
      .env.ci
  2. 1 0
      .gitignore
  3. 20 3
      .gitlab-ci.yml
  4. 207 195
      composer.lock
  5. 5 0
      phpunit.xml.dist
  6. 3 0
      symfony.lock

+ 28 - 0
.env.ci

@@ -0,0 +1,28 @@
+###> symfony/framework-bundle ###
+APP_ENV=dev
+APP_DEBUG=1
+APP_SECRET=6a76497c8658bb23e2236f97a2627df3
+#TRUSTED_PROXIES=127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
+#TRUSTED_HOSTS='^(localhost|example\.com)$'
+###< symfony/framework-bundle ###
+
+###> doctrine/doctrine-bundle ###
+# >>> No database shall be needed by unit tests
+DATABASE_URL=mysql://root:xxx@none:3306/opentalent?serverVersion=5.7
+###< doctrine/doctrine-bundle ###
+
+###> nelmio/cors-bundle ###
+CORS_ALLOW_ORIGIN=^https?://(localhost|127\.0\.0\.1)(:[0-9]+)$
+###< nelmio/cors-bundle ###
+
+###> BlackFire configuration ###
+BLACKFIRE_CLIENT_ID=988fcba8-552d-48df-a9c2-035c76535b69
+BLACKFIRE_CLIENT_TOKEN=8cfbeb263d044da9678dc2612531504da3790c308da7448e35724a5da91c136f
+BLACKFIRE_SERVER_ID=1171e53b-459b-41da-a292-80ff68cee8c2
+BLACKFIRE_SERVER_TOKEN=dbd1cfbea015fe83cccfc189a36ca3c16f3a1b43b94f50032a15e41e53548e8b
+###< BlackFire configuration ###
+
+###> AdminAssos configuration ###
+# >>> No database shall be needed by unit tests
+DATABASE_ADMINASSOS_URL=mysql://root:xxx@preprod:3306/none?serverVersion=5.7
+###< AdminAssos configuration ###

+ 1 - 0
.gitignore

@@ -34,3 +34,4 @@ symfony.lock
 /phpunit.xml
 .phpunit.result.cache
 ###< phpunit/phpunit ###
+/coverage/

+ 20 - 3
.gitlab-ci.yml

@@ -1,7 +1,24 @@
 stages:
   - test
 
+variables:
+  APP_ENV: ci
+  SSH_PRIVATE_KEY: $SSH_PRIVATE_KEY
+
 before_script:
+  - apt-get -yqq update
+  - apt-get -yqq install zip unzip git openssh-client
+
+  # Run ssh-agent and add private key
+  - eval $(ssh-agent -s)
+  - mkdir -p ~/.ssh
+  - chmod 700 ~/.ssh
+  - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
+  - ssh-add <(echo "$SSH_PRIVATE_KEY")
+  - git config --global user.email "exploitation@opentalent.fr"
+  - git config --global user.name "git"
+
+  # install composer
   - curl -sS https://composer.github.io/installer.sig > installer.sig
   - php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
   - php -r "if (hash_file('SHA384', 'composer-setup.php') === file_get_contents('installer.sig')) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
@@ -12,12 +29,12 @@ cache:
   paths:
     - ./vendor
 
-unit:otcore:
+unit:
   stage: test
 
   script:
-    - php composer.phar --quiet --no-interaction install
-    - ./bin/phpunit -c ./Tests/Build/UnitTests.xml --coverage-text --colors=never
+    - php composer.phar --no-interaction --quiet install
+    - ./bin/phpunit --configuration ./phpunit.xml.dist --coverage-text --colors=never
 
   artifacts:
     paths:

Файловите разлики са ограничени, защото са твърде много
+ 207 - 195
composer.lock


+ 5 - 0
phpunit.xml.dist

@@ -30,4 +30,9 @@
     <listeners>
         <listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
     </listeners>
+
+    <logging>
+        <log type="coverage-html" target="./coverage" lowUpperBound="35" highLowerBound="70"/>
+        <log type="junit" target="./coverage/junit-report.xml"/>
+    </logging>
 </phpunit>

+ 3 - 0
symfony.lock

@@ -25,6 +25,9 @@
     "composer/package-versions-deprecated": {
         "version": "1.11.99"
     },
+    "cyclonedx/cyclonedx-library": {
+        "version": "v1.0.3"
+    },
     "cyclonedx/cyclonedx-php-composer": {
         "version": "v3.4.1"
     },

Някои файлове не бяха показани, защото твърде много файлове са промени