-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
67 additions
and
17 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
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 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
- 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 |
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