CI¶
This guide shows how to use flake8 inside your CI.
travis¶
Here’s the minimal configuration required
to set up wemake-python-styleguide, flake8, travis up and running:
Learn how to build python projects with travis
Copy this configuration into your
.travis.yml:
dist: xenial language: python python: 3.7 install: pip install wemake-python-styleguide script: flake8 .
You can also have some inspiration in our own .travis.yml configuration file.
Gitlab CI¶
Setting up GitlabCI is also easy:
Learn how Gitlab CI works
Copy this configuration into your
.gitlab-ci.yml:
image: python3.12 test: before_script: pip install wemake-python-styleguide script: flake8 .
Examples:
GitlabCI+pythonofficial templatedjango+docker+GitlabCItemplate
pre-commit¶
To setup pre-commit with wemake-python-styleguide, add a new hook to the project .pre-commit-config.yaml file.
For example:
repos: - repo: https://github.com/wemake-services/wemake-python-styleguide rev: ... hooks: - id: wemake-python-styleguide