Skip to content

Introduce CI setup for online ldap tests. Fix discovered type errors #366

Introduce CI setup for online ldap tests. Fix discovered type errors

Introduce CI setup for online ldap tests. Fix discovered type errors #366

name: "Continuous Integration"
on:
pull_request:
push:
branches:
tags:
jobs:
matrix:
name: Generate job matrix
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.matrix.outputs.matrix }}
steps:
- name: Gather CI configuration
id: matrix
uses: laminas/laminas-ci-matrix-action@v1
qa:
name: QA Checks
needs: [matrix]
runs-on: ${{ matrix.operatingSystem }}
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
- name: Prepare LDAP test server
shell: bash
run: |
docker run --rm -d \
-v "$PWD"/.ci/ldif:/container/service/slapd/assets/config/bootstrap/ldif/custom:z \
-v "$PWD"/.ci/certs:/container/service/slapd/assets/certs:z \
--name service-ldap \
-e LDAP_DOMAIN="example.com" \
-e LDAP_ADMIN_PASSWORD="insecure" \
-e LDAP_TLS_CA_CRT_FILENAME="root-ca.crt" \
-e LDAP_TLS_CRT_FILENAME="server.crt" \
-e LDAP_TLS_KEY_FILENAME="server.key" \
osixia/openldap:1.5.0 \
"--copy-service --loglevel debug"
# wait for slapd to start. TODO: add real health check
sleep 1
- name: ${{ matrix.name }}
uses: laminas/laminas-continuous-integration-action@v1
with:
job: ${{ matrix.job }}
env:
TESTS_LAMINAS_LDAP_ONLINE_ENABLED: "true"
TESTS_LAMINAS_LDAP_HOST: "service-ldap"
TESTS_LAMINAS_LDAP_PORT: "389"