-
Notifications
You must be signed in to change notification settings - Fork 1
31 lines (31 loc) · 1.02 KB
/
lefthook.yaml
File metadata and controls
31 lines (31 loc) · 1.02 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
name: Check code issues
on:
workflow_call:
inputs:
node-version:
description: "Optionally install Node.js with the given version"
type: string
setup-command:
description: "Optional command to set up tools, plugins etc"
type: string
default: "uv sync --frozen --only-group lint"
jobs:
linter:
name: Lefthook
runs-on: zon-ubuntu-general-dind
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Install `uv`
uses: astral-sh/setup-uv@5a095e7a2014a4212f075830d4f7277575a9d098 # v7.3.1
with:
activate-environment: true
- name: Install Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
if: inputs.node-version
with:
node-version: ${{inputs.node-version}}
- name: Run setup command
run: ${{ inputs.setup-command }}
- name: Run code checks
run: lefthook run pre-commit --all-files