-
Notifications
You must be signed in to change notification settings - Fork 86
/
.pre-commit-config.yaml
84 lines (75 loc) · 2.24 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
default_install_hook_types: [pre-commit, pre-push, pre-merge-commit]
repos:
- repo: https://github.com/python/black
rev: 24.8.0
hooks:
- id: black
exclude: "^(docs/|examples/.*(schema|operations)[.]py)"
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-shebang-scripts-are-executable
- id: check-merge-conflict
- id: check-toml
- id: check-case-conflict
- id: double-quote-string-fixer
- id: end-of-file-fixer
exclude: ^examples/.*schema[.](json|py)
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/pycqa/flake8
rev: 7.1.1
hooks:
- id: flake8
additional_dependencies:
- flake8-builtins
- flake8-colors
- flake8-comprehensions
- flake8-deprecated
- flake8-module-name
- flake8-print
- flake8-requirements
- flake8-rst-docstrings
- flake8-tidy-imports
- repo: local
hooks:
- id: tests
name: tests
entry: pytest
language: system
pass_filenames: false
always_run: true
types: [python]
- id: docs
name: docs
entry: sphinx-build doc/source doc/build
language: system
pass_filenames: false
always_run: true
types: [python]
stages: [push, merge-commit]
- id: check-release
name: check-release
entry: poetry build
language: system
pass_filenames: false
always_run: true
stages: [push, merge-commit]
- id: test-github-example
name: Test GitHub example
entry: ./utils/test-example-common.sh ./examples/github
language: script
pass_filenames: false
always_run: true
types: [python]
stages: [push, merge-commit]
- id: test-shopify-example
name: Test Shopify example
entry: ./utils/test-example-common.sh ./examples/shopify
language: script
pass_filenames: false
always_run: true
types: [python]
stages: [push, merge-commit]