Skip to content

Commit b21b8fa

Browse files
committed
limit cargo to host-target crates and add a small manifest sanity check
1 parent 0575ca5 commit b21b8fa

1 file changed

Lines changed: 28 additions & 15 deletions

File tree

.github/workflows/ci.yml

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,39 @@ on:
66

77
jobs:
88
rust:
9-
name: cargo test
9+
name: cargo test (host targets)
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v4
1313
- uses: dtolnay/rust-toolchain@stable
14-
with:
15-
toolchain: 1.79.0
16-
- run: cargo test --workspace --exclude lien-hook-executor
14+
- run: cargo check -p lien-hook-runtime
15+
- run: cargo test -p lien-hook-runtime
16+
- run: cargo check -p lien-hook-library
17+
- run: cargo test -p lien-hook-library
1718

18-
ts:
19-
name: pnpm build
19+
manifests:
20+
name: manifest vs README
2021
runs-on: ubuntu-latest
2122
steps:
2223
- uses: actions/checkout@v4
23-
- uses: actions/setup-node@v4
24-
with:
25-
node-version: "20"
26-
- uses: pnpm/action-setup@v4
27-
with:
28-
version: 9
29-
- run: pnpm install --frozen-lockfile
30-
- run: pnpm --filter @liens-fi/sdk build
31-
- run: pnpm --filter lien-cli build
24+
- name: check libs advertised in README live in some Cargo.toml or package.json
25+
shell: bash
26+
run: |
27+
set -e
28+
checks=(
29+
"Marginfi:marginfi-client-v2"
30+
"Kamino:klend-sdk"
31+
"Solend:solend-sdk"
32+
"Anchor 0.31:anchor-lang"
33+
)
34+
for entry in "${checks[@]}"; do
35+
label="${entry%%:*}"
36+
dep="${entry##*:}"
37+
if grep -qi "$label" README.md; then
38+
if ! grep -rqE "$dep" packages/ --include="Cargo.toml" --include="package.json"; then
39+
echo "::error::README mentions '$label' but no manifest declares '$dep'"
40+
exit 1
41+
fi
42+
fi
43+
done
44+
echo "manifest OK"

0 commit comments

Comments
 (0)