ci
Project description
# badwolf
[What is badwolf](https://en.wikipedia.org/wiki/Bad_Wolf)
Features:
Run tests in Docker container
Supports multiple test scripts
Supports multiple after success/failure scripts
Supports E-mail notification
Supports code linting
## Installation
`bash $ python setup.py install `
for development:
`bash $ pip install -r dev-requirements.txt $ python setup.py develop `
## Configuration
There are several ways to configure badwolf, settings loading by orders below:
Try to load from ~/.badwolf.conf.py
Try to use BADWOLF_CONF environment variable to set configuration file path and load it
Dict or a file path passed to badwolf.create_app function
## Run server for development
`bash $ badwolf runserver `
## Interactive shell
`bash $ badwolf shell `
## Run tests
`bash $ py.test -v `
Open interactive shell when test failed:
`bash $ py.test -v -s --pdb `
## Packaging and release
Build a distribution:
`bash $ python setup.py release `
Upload package to PyPI cloud:
`bash twine upload -r bosondata dist/* `
## Test configuration file
Configuration file use YAML format, filename should be .badwolf.yml
Fields:
dockerfile: Dockfile name for build docker image, str
script: Test scipt(s), str or list
after_success: command(s) to run after success, str or list
after_failure: command(s) to run after failure, str or list
service: service(s) to start before run script(s), str or list
env: envrionment variable(s), str or list, only the first item will be used currently. Eg: env: X=1 Y=2 Z=3
linter: code linter(s), str or list
Dockerfile should set FROM as messense/badwolf-test-runner in order to use [badwolf-runner](https://bitbucket.org/deepanalyzer/badwolf-runner/overview) to run tests. But surely you can build your own docker image and use it as long as you put badwolf-run binary in its executable path.
if no Dockerfile found, badwolf will use messense/badwolf-test-runner as default Docker image to run tests.
## Available linters
flake8: Lint Python codes with flake8
pep8: Lint Python codes with pep8
jscs: Lint JavaScript codes with jscs
eslint: Lint ECMAScript 6 codes with eslint
csslint: Lint CSS codes with csslint
shellcheck: Lint bash/sh/zsh shell scripts with shellcheck
yamllint: Lint YAML codes with yamllint
jsonlint: Lint JSON codes with jsonlint