Github Actions¶
Good news: we ship pre-built Github Action with this project.
You can use it from the Github Marketplace:
- name: wemake-python-styleguide
uses: wemake-services/wemake-python-styleguide
You can also specify any version
starting from 0.12.5 instead of the latest tag.
You can also specify to leave inline PR comments
and PR summary review starting from 0.13.1 version.
Inputs¶
reporter
We support three reporting options:
terminal(default one) when we just dump the output into Action’s logs. Is the easiest one to setup, that’s why we use it by defaultgithub-pr-review(recommended) when we use inline comments inside code reviewsgithub-pr-checkwhen we use Github Checks for the output
Take a note that github-pr-review and github-pr-check requires
GITHUB_TOKEN environment variable to be set.
Default reporter looks like so:
For example, that’s how github-pr-reviews can be set up:
- name: wemake-python-styleguide
uses: wemake-services/wemake-python-styleguide
with:
reporter: 'github-pr-review'
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
That’s how the result will look like:
path
We also support custom path to be specified:
- name: wemake-python-styleguide
uses: wemake-services/wemake-python-styleguide
with:
path: './your/custom/path'
Outputs¶
We also support outputs from the spec, so you can later
pass the output of wemake-python-styleguide to somewhere else.
- name: wemake-python-styleguide
uses: wemake-services/wemake-python-styleguide
- name: Custom Action
runs: echo "{{ steps.wemake-python-styleguide.outputs.output }}"