Skip to content
Snippets Groups Projects
Commit 1b24f840 authored by Julian Rother's avatar Julian Rother
Browse files

Added dummy test and test CI job

parent 7b59e62e
Branches
Tags
No related merge requests found
Pipeline #7003 failed
docs/_build/
dist/
# coverage
.coverage
htmlcov
coverage.xml
# pytest
report.xml
# pylint
pylint.html
codeclimate.json
*.egg-info
__pycache__
*.pyc
......
......@@ -2,7 +2,7 @@ linter:
stage: test
image: python:3.7
script:
- pip3 install pylint-gitlab # this force-updates jinja2 and some other packages!
- pip install pylint-gitlab
- python3 -m pylint --exit-zero --rcfile .pylintrc --output-format=pylint_gitlab.GitlabCodeClimateReporter src/ldapserver > codeclimate.json || true
- python3 -m pylint --exit-zero --rcfile .pylintrc --output-format=pylint_gitlab.GitlabPagesHtmlReporter src/ldapserver > pylint.html || true
- python3 -m pylint --rcfile .pylintrc --output-format=text src/ldapserver
......@@ -14,8 +14,28 @@ linter:
reports:
codequality: codeclimate.json
test:
stage: test
image: python:3.7
script:
- pip install pytest coverage
- PYTHONPATH=src coverage run --include 'src/*.py' -m pytest --junitxml=report.xml
- coverage report -m
- coverage html
- coverage xml
artifacts:
when: always
paths:
- htmlcov/index.html
- htmlcov
expose_as: 'Coverage Report'
reports:
cobertura: coverage.xml
junit: report.xml
coverage: '/^TOTAL.*\s+(\d+\%)$/'
build-docs:
stage: build
stage: deploy
image: python:3.7
script:
- pip install Sphinx sphinx-rtd-theme
......
import unittest
# Test if imports work in tests
from ldapserver.dn import DN
class TestDummy(unittest.TestCase):
def test_dummy(self):
DN('cn=foobar') == DN('CN=foobar')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment