Skip to content

Commit 9c7a7c7

Browse files
committed
fix: ci
1 parent a799909 commit 9c7a7c7

3 files changed

Lines changed: 43 additions & 21 deletions

File tree

.github/workflows/lint.yml

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -39,23 +39,5 @@ jobs:
3939
${{ runner.os }}-cargo-lint-
4040
${{ runner.os }}-cargo-
4141
42-
- name: Check formatting
43-
run: cargo fmt --all --check
44-
45-
- name: Run clippy
46-
run: cargo clippy --all-targets --all-features -- -D warnings
47-
48-
- name: Run clippy (create-and-update)
49-
run: cargo clippy --manifest-path create-and-update/Cargo.toml --all-targets --all-features -- -D warnings
50-
51-
- name: Run clippy (counter/anchor)
52-
run: cargo clippy --manifest-path counter/anchor/Cargo.toml --all-targets --all-features -- -D warnings
53-
54-
- name: Run clippy (counter/native)
55-
run: cargo clippy --manifest-path counter/native/Cargo.toml --all-targets --all-features -- -D warnings
56-
57-
- name: Run clippy (counter/pinocchio)
58-
run: cargo clippy --manifest-path counter/pinocchio/Cargo.toml --all-targets --all-features -- -D warnings
59-
60-
- name: Run clippy (account-comparison)
61-
run: cargo clippy --manifest-path account-comparison/Cargo.toml --all-targets --all-features -- -D warnings
42+
- name: Run lint script
43+
run: ./scripts/lint.sh

.github/workflows/program-tests.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ jobs:
5454
uses: actions/setup-node@v4
5555
with:
5656
node-version: "23.5.0"
57-
cache: "npm"
5857

5958
- name: Cache Rust dependencies
6059
uses: actions/cache@v4

scripts/lint.sh

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
echo "Checking formatting..."
6+
7+
# Check formatting for each crate
8+
echo "Checking create-and-update..."
9+
cd create-and-update && cargo fmt --check && cd ..
10+
11+
echo "Checking counter/anchor..."
12+
cd counter/anchor && cargo fmt --check && cd ../..
13+
14+
echo "Checking counter/native..."
15+
cd counter/native && cargo fmt --check && cd ../..
16+
17+
echo "Checking counter/pinocchio..."
18+
cd counter/pinocchio && cargo fmt --check && cd ../..
19+
20+
echo "Checking account-comparison..."
21+
cd account-comparison && cargo fmt --check && cd ..
22+
23+
echo "Running clippy..."
24+
25+
# Run clippy for each crate
26+
echo "Running clippy on create-and-update..."
27+
cargo clippy --manifest-path create-and-update/Cargo.toml --all-targets --all-features -- -D warnings
28+
29+
echo "Running clippy on counter/anchor..."
30+
cargo clippy --manifest-path counter/anchor/Cargo.toml --all-targets --all-features -- -D warnings
31+
32+
echo "Running clippy on counter/native..."
33+
cargo clippy --manifest-path counter/native/Cargo.toml --all-targets --all-features -- -D warnings
34+
35+
echo "Running clippy on counter/pinocchio..."
36+
cargo clippy --manifest-path counter/pinocchio/Cargo.toml --all-targets --all-features -- -D warnings
37+
38+
echo "Running clippy on account-comparison..."
39+
cargo clippy --manifest-path account-comparison/Cargo.toml --all-targets --all-features -- -D warnings
40+
41+
echo "Lint checks completed successfully!"

0 commit comments

Comments
 (0)