Skip to content

Commit 1373cbd

Browse files
authored
chore: sync changes with nomos-node (#57)
1 parent 5bc989d commit 1373cbd

File tree

2 files changed

+47
-1
lines changed

2 files changed

+47
-1
lines changed

.github/workflows/code-check.yml

+40
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,46 @@ jobs:
4343
arguments:
4444
command-arguments: "--hide-inclusion-graph -c .cargo-deny.toml --show-stats -D warnings"
4545

46+
features:
47+
name: Check packages feature combinations
48+
runs-on: ubuntu-latest
49+
steps:
50+
- name: Checkout repository
51+
uses: actions/checkout@v4
52+
- name: Install cargo-hack
53+
uses: taiki-e/install-action@v2
54+
with:
55+
tool: cargo-hack
56+
- name: Set up Cargo cache
57+
uses: ./.github/actions/setup-cargo-cache
58+
with:
59+
key: ${{ github.ref }}->${{ github.workflow }}->${{ github.job }}
60+
github-token: ${{ secrets.GITHUB_TOKEN }}
61+
- name: Run cargo-hack
62+
env:
63+
RISC0_SKIP_BUILD: true
64+
RUSTFLAGS: -D warnings
65+
run: cargo hack --feature-powerset --no-dev-deps check
66+
- name: Update Cargo cache
67+
if: success() || failure()
68+
uses: ./.github/actions/update-cargo-cache
69+
with:
70+
key: ${{ github.ref }}->${{ github.workflow }}->${{ github.job }}
71+
72+
unused-deps:
73+
name: Check for unused dependencies
74+
runs-on: ubuntu-latest
75+
steps:
76+
- name: Checkout repository
77+
uses: actions/checkout@v4
78+
- name: Install cargo-machete
79+
uses: bnjbvr/[email protected]
80+
# This step also runs `cargo-machete` without the `--with-metadata` flag, which can trigger more false positives.
81+
# We ignore errors and run `cargo-machete` with the `--with-metadata` flag for the actual result.
82+
continue-on-error: true
83+
- name: Run cargo-machete
84+
run: cargo machete --with-metadata
85+
4686
lints:
4787
name: Check Rust lints
4888
runs-on: ubuntu-latest

examples/ping_pong/Cargo.toml

+7-1
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,15 @@ async-trait = "0.1.83"
1313
const_format = "0.2.34"
1414
overwatch = { workspace = true }
1515
overwatch-derive = { workspace = true }
16-
project-root = "0.2.2"
1716
serde = { version = "1.0.216", features = ["derive"] }
1817
serde_json = "1.0.134"
1918
thiserror = "2.0.8"
2019
tokio = { version = "1.42.0", features = ["macros"] }
2120
tracing = "0.1.41"
21+
22+
[package.metadata.cargo-machete]
23+
# False positives.
24+
ignored = [
25+
# Required by Overwatch's `#[derive(Services)]` macro.
26+
"tracing",
27+
]

0 commit comments

Comments
 (0)