Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
mrvanes committed Sep 24, 2024
1 parent 4cf052b commit 6fcc54f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ jobs:
ports:
- 389:389
volumes:
- ./misc/schema:/opt/misc/schema
- ${{ github.workspace }}/misc/schema:/opt/misc/schema
options: --name ldap
env:
LDAP_SEED_INTERNAL_SCHEMA_PATH: /opt/misc/schema
LDAP_DOMAIN: services.sram.tld
Expand All @@ -38,7 +39,15 @@ jobs:
LDAP_TLS: true

steps:
# - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
- name: Checkout
uses: actions/checkout@master
with:
path: plsc

- name: Restart LDAP container
uses: docker://docker
with:
args: docker restart ldap

- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libsasl2-dev libldap2-dev ldap-utils
Expand All @@ -49,16 +58,19 @@ jobs:
python-version: ${{ matrix.python }}

- name: Install dependencies
working-directory: ./plsc
run: |
python3 -m pip install --upgrade pip flake8 gera2ld-pyserve
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Check syntax
working-directory: ./plsc
run: |
flake8 .
- name: ldap - Initialization...
working-directory: ./plsc
run: >
sleep 5;
ldapwhoami -H ${LDAP_URL} -D ${LDAP_BIND_DN} -w ${LDAP_ADMIN_PASSWORD};
Expand All @@ -81,6 +93,7 @@ jobs:
# uses: mxschmitt/action-tmate@v3

- name: Run pytest...
working-directory: ./plsc
run: |
export PYTHONPATH="."
pytest
Expand All @@ -91,6 +104,7 @@ jobs:
LDAP_BIND_DN: cn=admin,dc=services,dc=sram,dc=tld

- name: Dump ldap...
working-directory: ./plsc
run:
ldapsearch -x -H ${LDAP_URL} -b ${LDAP_BASE_DN} -s sub objectclass=organizationalUnit
env:
Expand Down
4 changes: 2 additions & 2 deletions run-ldapci.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
docker rm ldap-ci || true
docker rm ldap || true
docker run -ti \
-e "LDAP_SEED_INTERNAL_SCHEMA_PATH=/opt/misc/schema" \
-e "LDAP_DOMAIN=services.sram.tld" \
Expand All @@ -10,5 +10,5 @@ docker run -ti \
-e "LDAP_TLS=true" \
-v "./misc/schema:/opt/misc/schema" \
-p 389:389 \
--name ldap-ci \
--name ldap \
osixia/openldap:latest

0 comments on commit 6fcc54f

Please sign in to comment.