-
Notifications
You must be signed in to change notification settings - Fork 3
37 lines (35 loc) · 1.05 KB
/
pre-commit.yaml
File metadata and controls
37 lines (35 loc) · 1.05 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
name: pre-commit
on:
pull_request:
push:
branches: [main]
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: pnpm/action-setup@v4
with:
version: 10
- name: Install node dependencies
working-directory: ./browser-extension
run: pnpm install
- name: set PY
run: echo "PY=$(python -c 'import hashlib, sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
- uses: pre-commit/action@v3.0.0
name: ruff-check
with:
extra_args: ruff-check --all-files
- uses: pre-commit/action@v3.0.0
name: check-merge-conflict
with:
extra_args: check-merge-conflict --all-files
- uses: pre-commit/action@v3.0.0
name: mixed-line-ending
with:
extra_args: mixed-line-ending --all-files