diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bf42323c099..929b4069e3f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,6 +67,8 @@ jobs: MYSQL_ALLOW_EMPTY_PASSWORD: "yes" options: >- --shm-size=1g + openldap: + image: "glpi/githubactions-openldap" steps: - name: "Checkout" uses: "actions/checkout@v1" @@ -92,6 +94,11 @@ jobs: - name: "Unit tests" run: | docker exec ${{ job.services.app.id }} vendor/bin/atoum -p 'php -d memory_limit=512M' --debug --force-terminal --use-dot-report --configurations tests/telemetry.php --bootstrap-file tests/bootstrap.php --no-code-coverage -d tests/units + - name: "LDAP tests" + run: | + for f in `ls tests/LDAP/ldif/*.ldif`; do cat $f | docker exec --interactive ${{ job.services.openldap.id }} ldapadd -x -H ldap://127.0.0.1:3890/ -D "cn=Manager,dc=glpi,dc=org" -w insecure ; done + docker exec ${{ job.services.db.id }} mysql --user=root --execute="UPDATE \`glpi\`.\`glpi_authldaps\` SET \`host\` = 'openldap';" + docker exec ${{ job.services.app.id }} vendor/bin/atoum -p 'php -d memory_limit=512M' --debug --force-terminal --use-dot-report --configurations tests/telemetry.php --bootstrap-file tests/bootstrap.php --no-code-coverage --max-children-number 1 -d tests/LDAP - name: "Functionnal tests" run: | docker exec ${{ job.services.app.id }} vendor/bin/atoum -p 'php -d memory_limit=512M' --debug --force-terminal --use-dot-report --configurations tests/telemetry.php --bootstrap-file tests/bootstrap.php --no-code-coverage --max-children-number 1 -d tests/functionnal