Add SHARED_ACCOUNTS #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: python:${{ 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: | | |
apt-get update && 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 |