Skip to content

Commit 5aaa580

Browse files
authored
Add guardian signature (#1)
1 parent 2981a89 commit 5aaa580

File tree

13 files changed

+7717
-1
lines changed

13 files changed

+7717
-1
lines changed

.github/workflows/ci-pre-commit.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Pre-commit checks
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
8+
jobs:
9+
pre-commit:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v3
14+
with:
15+
# Need to grab the history of the PR
16+
fetch-depth: 0
17+
18+
- name: Set up Python (for pre-commit)
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: '3.x'
22+
23+
- name: Install pre-commit
24+
run: pip install pre-commit
25+
26+
- uses: actions-rs/toolchain@v1
27+
with:
28+
profile: minimal
29+
toolchain: 1.87.0
30+
components: clippy
31+
- uses: actions-rs/toolchain@v1
32+
with:
33+
profile: minimal
34+
toolchain: nightly-2024-12-03
35+
components: rustfmt
36+
37+
- name: Run pre-commit on all files
38+
run: pre-commit run --all-files

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/target
2+
.secret

.pre-commit-config.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
repos:
2+
- repo: local
3+
hooks:
4+
# Hooks for workspace
5+
- id: cargo-fmt-workspace
6+
name: Cargo format for workspace
7+
language: "rust"
8+
entry: cargo +nightly-2024-12-03 fmt --manifest-path ./Cargo.toml --all -- --config-path rustfmt.toml
9+
pass_filenames: false
10+
types_or: ["rust", "cargo", "cargo-lock"]
11+
files: .
12+
- id: cargo-clippy-workspace
13+
name: Cargo clippy for workspace
14+
language: "rust"
15+
entry: cargo +1.87.0 clippy --manifest-path ./Cargo.toml --tests -- -D warnings
16+
pass_filenames: false
17+
types_or: ["rust", "cargo", "cargo-lock"]
18+
files: .
19+
- id: cargo-test-workspace
20+
name: Cargo test for workspace
21+
language: "rust"
22+
entry: cargo +1.87.0 test --manifest-path ./Cargo.toml
23+
pass_filenames: false
24+
types_or: ["rust", "cargo", "cargo-lock"]
25+
files: .

0 commit comments

Comments
 (0)