Skip to content
Snippets Groups Projects
Commit dd693d35 authored by nimrod's avatar nimrod
Browse files

Merge branch 'feature/tox_env' of /home/nimrod/Documents/Shore/Ansible/example

# Conflicts:
#	.gitignore
parents 0ae378bf dd768002
No related branches found
No related tags found
No related merge requests found
...@@ -10,3 +10,4 @@ __pycache__ ...@@ -10,3 +10,4 @@ __pycache__
*.log *.log
*.retry *.retry
id_rsa* id_rsa*
.tox
...@@ -24,12 +24,7 @@ ...@@ -24,12 +24,7 @@
files: tests/playbook.yml files: tests/playbook.yml
args: args:
- tests/playbook.yml - tests/playbook.yml
- repo: local - repo: https://github.com/adarnimrod/python-pre-commit.git
sha: v0.1.0
hooks: hooks:
- id: piprot - id: piprot
name: piprot
description: Check up-to-date Python requirements
language: system
entry: piprot --outdated tests/requirements.txt
files: requirements.txt
always_run: true
...@@ -8,14 +8,15 @@ env: ...@@ -8,14 +8,15 @@ env:
global: global:
- VBOX_MEMORY=2048 - VBOX_MEMORY=2048
matrix: matrix:
- platform: openbsd60 - TOXENV=pre-commit
- &openbsd59 platform=openbsd59 - TOXENV=openbsd60
- platform: xenial - &openbsd59 TOXENV=openbsd59
- platform: trusty - TOXENV=xenial
- platform: precise - TOXENV=trusty
- &stretch platform=stretch - TOXENV=precise
- platform: jessie - &stretch TOXENV=stretch
- platform: wheezy - TOXENV=jessie
- TOXENV=wheezy
matrix: matrix:
fast_finish: True fast_finish: True
allow_failures: allow_failures:
...@@ -32,13 +33,10 @@ install: ...@@ -32,13 +33,10 @@ install:
- sudo apt-get install -y linux-headers-$(uname -r) virtualbox - sudo apt-get install -y linux-headers-$(uname -r) virtualbox
- wget https://releases.hashicorp.com/vagrant/1.9.1/vagrant_1.9.1_x86_64.deb - wget https://releases.hashicorp.com/vagrant/1.9.1/vagrant_1.9.1_x86_64.deb
- sudo dpkg -i vagrant_1.9.1_x86_64.deb - sudo dpkg -i vagrant_1.9.1_x86_64.deb
- pip install -r tests/requirements.txt | cat - pip install tox | cat
- ansible-galaxy install git+file://$(pwd),$(git rev-parse --abbrev-ref HEAD) -p .molecule/roles
- molecule dependency
script: script:
- pre-commit run --all-files - travis_wait 45 tox
- travis_wait 45 molecule test --platform $platform
notifications: notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/ webhooks: https://galaxy.ansible.com/api/v1/notifications/
......
...@@ -5,6 +5,10 @@ ansible: ...@@ -5,6 +5,10 @@ ansible:
diff: True diff: True
config_file: ../ansible.cfg config_file: ../ansible.cfg
molecule:
ignore_paths:
- .tox
dependency: dependency:
name: galaxy name: galaxy
requirements_file: tests/requirements.yml requirements_file: tests/requirements.yml
......
tox.ini 0 → 100644
[tox]
skip_install = True
skipsdist = True
envlist = openbsd60,openbsd59,xenial,trusty,precise,stretch,jessie,wheezy
[testenv:pre-commit]
deps = -rtests/requirements.txt
whitelist_externals =
sh
commands =
sh -c "ansible-galaxy install git+file://$(pwd),$(git rev-parse --abbrev-ref HEAD) -p .molecule/roles"
molecule dependency
pre-commit run --all-files
[testenv]
deps = -rtests/requirements.txt
passenv = HOME
whitelist_externals =
sh
commands =
sh -c "ansible-galaxy install git+file://$(pwd),$(git rev-parse --abbrev-ref HEAD) -p .molecule/roles"
molecule test --platform {envname}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment