Skip to content

Fix permissions problem on CI (maybe) #4

Fix permissions problem on CI (maybe)

Fix permissions problem on CI (maybe) #4

Workflow file for this run

name: CI
on:
push:
pull_request:
env:
LDAP_BIND_SERVER: "ldap://dirsrv:3389"
LDAP_BIND_DN: "cn=Directory Manager"
LDAP_BIND_PASSWORD: "asd"
TEST_SUFFIX: "dc=example,dc=test"
jobs:
run-tests:
strategy:
matrix:
python: [ '3.9', '3.12', 'latest' ]
services:
dirsrv:
image: "389ds/dirsrv:3.0"
ports:
- 3389:3389
env:
DS_SUFFIX_NAME: ${{env.TEST_SUFFIX}}
DS_DM_PASSWORD: ${{env.LDAP_BIND_PASSWORD}}
options: >-
--health-cmd "dsctl localhost healthcheck --check backends:localhost:search" --health-interval 10s --health-timeout 5s --health-retries 5
runs-on: ubuntu-latest
container:
image: ${{ matrix.python }}
env:
LDAP_BIND_SERVER: ${{env.LDAP_BIND_SERVER}}
LDAP_BIND_DN: ${{env.LDAP_BIND_DN}}
LDAP_BIND_PASSWORD: ${{env.LDAP_BIND_PASSWORD}}
TEST_SUFFIX: ${{env.TEST_SUFFIX}}
steps:
- name: Checkout
uses: actions/checkout@v3
# - name: Setup Python
# uses: actions/setup-python@v5
# with:
# python-version: ${{ matrix.python }}
- name: Install package dependencies
run: |
sudo apt-get install -y libsasl2-dev python-dev-is-python3 libldap2-dev libssl-dev
- name: Install Python dependencies
run: |
pip install -r requirements.txt
- name: Install pytest
run: |
pip install pytest
- name: Run test script
run: |
pytest tests/tests.py