]> git.madduck.net Git - etc/vim.git/blob - docs/integrations/github_actions.md

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Fix and test docs on Windows (#2262)
[etc/vim.git] / docs / integrations / github_actions.md
1 # GitHub Actions integration
2
3 You can use _Black_ within a GitHub Actions workflow without setting your own Python
4 environment. Great for enforcing that your code matches the _Black_ code style.
5
6 ## Usage
7
8 Create a file named `.github/workflows/black.yml` inside your repository with:
9
10 ```yaml
11 name: Lint
12
13 on: [push, pull_request]
14
15 jobs:
16   lint:
17     runs-on: ubuntu-latest
18     steps:
19       - uses: actions/checkout@v2
20       - uses: actions/setup-python@v2
21       - uses: psf/black@stable
22 ```
23
24 We recommend the use of the `@stable` tag, but per version tags also exist if you prefer
25 that.
26
27 You may use `options` (Default is `'--check --diff'`) and `src` (Default is `'.'`) as
28 follows:
29
30 ```yaml
31 - uses: psf/black@stable
32   with:
33     options: "--check --verbose"
34     src: "./src"
35 ```