Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 101 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
version: 2.1

orbs:
python: circleci/python@2.0.3

executors:
python-docker:
parameters:
version:
description: "version tag"
default: "lts"
type: string
docker:
- image: python:<<parameters.version>>
auth:
username: atterdag
password: $DOCKERHUB_PASSWORD
cimg-python-docker:
parameters:
version:
description: "version tag"
default: "lts"
type: string
docker:
- image: cimg/python:<<parameters.version>>
auth:
username: atterdag
password: $DOCKERHUB_PASSWORD

jobs:
test:
parameters:
version:
description: "version tag"
default: "latest"
type: string
executor:
name: cimg-python-docker
version: <<parameters.version>>
steps:
- checkout
- run:
name: Install prerequisites
command: |
sudo apt-get update
sudo apt-get install --yes jq libssl-dev libldap2-dev libsasl2-dev python2-dev python3-dev
- python/install-packages:
pkg-manager: pip
- run:
name: Test with tox
command: |
tox -e test
pep8:
executor:
name: python/default
steps:
- checkout
- run:
name: Install prerequisites
command: |
sudo apt-get update
sudo apt-get install --yes jq libssl-dev libldap2-dev libsasl2-dev python2-dev python3-dev
- python/install-packages:
pkg-manager: pip
- run:
name: Test PEP8 with tox
command: |
tox -e pep8
check:
executor:
name: python/default
steps:
- checkout
- run:
name: Install prerequisites
command: |
sudo apt-get update
sudo apt-get install --yes jq libssl-dev libldap2-dev libsasl2-dev python2-dev python3-dev
- python/install-packages:
pkg-manager: pip
- run:
name: Test twine with tox
command: |
tox -e check

workflows:
build:
jobs:
- pep8
- test:
matrix:
parameters:
version:
- "2.7"
- "3.5"
- "3.6"
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- check
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@ Install the following OS development packages first.

::

sudo apt-get install libssl-dev libldap2-dev libsasl2-dev python2-dev python3-dev
sudo apt-get install jq libssl-dev libldap2-dev libsasl2-dev python2-dev python3-dev
mkvirtualenv --python=/usr/bin/python3 python3-development
pip install --requirement requirements.txt
pip install --requirement requirements-full.txt


License
Expand Down
19 changes: 19 additions & 0 deletions requirements-full.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
ansible
autopep8
doc8
flake8
gitchangelog
pep8
pip
pycodestyle
pydocstyle
pylint
python-ldap
restructuredtext-lint
setuptools
sphinx
sphinx_rtd_theme
tox==3.7.0
tqdm
twine
wheel
30 changes: 11 additions & 19 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
ansible
autopep8
doc8
flake8
gitchangelog
pep8
pip
pycodestyle
pydocstyle
pylint
python-ldap
restructuredtext-lint
setuptools
sphinx
sphinx_rtd_theme
tox==3.7.0
tqdm
twine
wheel
autopep8==1.6.0
doc8==0.11.1
flake8==4.0.1
gitchangelog==3.0.4
pep8==1.7.1
pydocstyle==6.1.1
pylint==2.13.8
sphinx-rtd-theme==1.0.0
tox==3.25.0
tqdm==4.64.0
twine==4.0.0
87 changes: 5 additions & 82 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,9 @@
minversion = 3.7.0
envlist =
pep8
py27
py35
py36
py37
py38
test
check

[testenv]
install_command = pip install {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_ALL=C
whitelist_externals = bash
commands = python -m pytest {posargs}

[testenv:pep8]
install_command = pip install {opts} {packages}
setenv =
Expand All @@ -27,77 +13,14 @@ setenv =
LANGUAGE=en_US:en
LC_ALL=C
whitelist_externals = bash,test
commands = flake8 --verbose
commands = python -m flake8 --verbose
deps =
flake8==4.0.1
pep8==1.7.1
pytest-pep8==1.0.6

[testenv:py27]
basepython = python2.7
install_command = pip install {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_ALL=C
ANSIBLE_STDOUT_CALLBACK=yaml
; I would really like to use pytest-ansible or pytest-ansible-playbook but I
; simply can't get them to work as expected.
commands =
ansible-playbook --inventory {toxinidir}/test/inventory.yml {toxinidir}/test/playbook.yml
deps =
ansible
python-ldap
; pytest-ansible-playbook
; pytest-ansible

[testenv:py35]
basepython = python3.5
install_command = pip install {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_ALL=C
ANSIBLE_STDOUT_CALLBACK=yaml
commands =
ansible-playbook --inventory {toxinidir}/test/inventory.yml {toxinidir}/test/playbook.yml
deps =
ansible
python-ldap

[testenv:py36]
basepython = python3.6
install_command = pip install {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_ALL=C
ANSIBLE_STDOUT_CALLBACK=yaml
commands =
ansible-playbook --inventory {toxinidir}/test/inventory.yml {toxinidir}/test/playbook.yml
deps =
ansible
python-ldap

[testenv:py37]
basepython = python3.7
install_command = pip install {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_ALL=C
ANSIBLE_STDOUT_CALLBACK=yaml
commands =
ansible-playbook --inventory {toxinidir}/test/inventory.yml {toxinidir}/test/playbook.yml
deps =
ansible
python-ldap

[testenv:py38]
basepython = python3.8
[testenv:test]
basepython = python
install_command = pip install {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
Expand Down