forked from prefix-dev/rattler-build
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlefthook.yaml
More file actions
92 lines (87 loc) · 2.7 KB
/
lefthook.yaml
File metadata and controls
92 lines (87 loc) · 2.7 KB
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
85
86
87
88
89
90
91
92
lefthook: pixi run --no-progress --environment=pre-commit lefthook
no_auto_install: true
templates:
run: run --quiet --no-progress --environment=lint
run-py: run --quiet --no-progress --manifest-path py-rattler-build/pixi.toml --environment lint
colors: true
output:
- meta # Print lefthook version
- summary # Print summary block (successful and failed steps)
- empty_summary # Print summary heading when there are no steps to run
# - success # Print successful steps
# - failure # Print failed steps printing
# - execution # Print any execution logs
# - execution_out # Print execution output
# - execution_info # Print `EXECUTE > ...` logging
- skips # Print "skip" (i.e. no files matched)
pre-commit:
parallel: true
jobs:
- name: actionlint
run: pixi {run} actionlint
- name: cargo-deny
glob: "Cargo.lock,Cargo.toml"
stage_fixed: true
run: pixi {run} cargo-deny
- name: cargo-fmt
glob: "*.rs"
group:
jobs:
- name: cargo-fmt check
run: pixi {run} cargo-fmt-check
- name: cargo-fmt fix
run: pixi {run} cargo-fmt
stage_fixed: true
- name: ruff
glob: "*.{py,pyi}"
exclude:
- test-data/conda-forge/**/*
- test-data/recipes/test-rendering/*
stage_fixed: true
group:
piped: true
jobs:
- name: ruff lint
run: pixi {run} ruff-lint {staged_files}
- name: ruff format
run: pixi {run} ruff-format {staged_files}
- name: taplo
stage_fixed: true
glob: "*.toml"
exclude:
- schema/examples/invalid/*.toml
run: pixi {run} toml-format {staged_files}
- name: prettier
glob: "*.{yaml,yml}"
group:
jobs:
- name: prettier check
run: pixi {run} prettier-check {staged_files}
- name: prettier fmt
run: pixi {run} prettier-fmt {staged_files}
stage_fixed: true
- name: py-rattler-build-cargo-fmt
glob: "py-rattler-build/rust/**/*.rs"
stage_fixed: true
run: pixi {run-py} fmt-rust
- name: py-rattler-build-ruff
glob: "py-rattler-build/**/*.{py,pyi}"
run: pixi {run-py} lint-python
- name: nbstripout
glob: "*.ipynb"
stage_fixed: true
run: pixi {run} nbstripout {staged_files}
- name: typos
stage_fixed: true
run: pixi {run} typos
pre-push:
jobs:
- name: cargo-clippy
glob: "*.rs"
run: pixi {run} cargo-clippy
- name: check-native-tls
glob: "Cargo.{toml,lock}"
run: pixi {run} check-native-tls
- name: py-rattler-build-cargo-clippy
glob: "py-rattler-build/rust/**/*.rs"
run: pixi {run-py} lint-rust