Skip to content

Commit e0083cd

Browse files
committed
chore(ci): Validate basics in CI / pre-commit
1 parent 7fe7ce9 commit e0083cd

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

.github/workflows/pre-commit.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: pre-commit
2+
3+
permissions: {} # none
4+
5+
on:
6+
pull_request:
7+
push:
8+
branches: [main]
9+
10+
env:
11+
RUST_BACKTRACE: 1
12+
CARGO_TERM_COLOR: always
13+
CLICOLOR: 1
14+
15+
jobs:
16+
pre-commit:
17+
permissions:
18+
contents: read
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
- uses: actions/setup-python@v4
23+
- uses: pre-commit/action@v3.0.0

.pre-commit-config.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.5.0
4+
hooks:
5+
- id: check-yaml
6+
stages: [commit]
7+
- id: check-json
8+
stages: [commit]
9+
- id: check-toml
10+
stages: [commit]
11+
- id: check-merge-conflict
12+
stages: [commit]
13+
- id: check-case-conflict
14+
stages: [commit]
15+
- id: detect-private-key
16+
stages: [commit]

0 commit comments

Comments
 (0)