-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (39 loc) · 1.13 KB
/
linter.yml
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
name: Lint codebase
# For more details, see original the original version in this repo:
# <https://github.com/thijsputman/home-assistant-config/>
"on":
push:
branches: ["**"]
tags-ignore: ["**"]
pull_request:
branches: [main]
jobs:
lint:
name: Run pre-commit
runs-on: ubuntu-22.04
steps:
- name: Checkout code
with:
persist-credentials: false
uses: actions/checkout@v3
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cache/pre-commit
~/.cache/pip
~/.npm
~/.local/bin
# yamllint disable rule:line-length
# yamllint disable-line rule:quoted-strings
key: "pre-commit-cache-\
${{ hashFiles('.pre-commit-config.yaml', '.github/scripts/setup-pre-commit.sh') }}"
# yamllint enable rule:line-length
- name: Install dependencies
env:
USE_PIPX: "false"
run: .github/scripts/setup-pre-commit.sh
shell: bash
- name: Run pre-commit
run: pre-commit run --color=always --all-files
shell: bash