Skip to content

Commit 21e1a5c

Browse files
committed
checks: Change to running tests per crate
Running tests from the workspace root can cause build issues with embassy. Move to running tests for each crate individually instead.
1 parent 62ddb55 commit 21e1a5c

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

.github/workflows/check.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,18 +133,31 @@ jobs:
133133
log-level: warn
134134
command: check
135135
arguments: --all-features --locked
136-
137136
test:
138137
runs-on: ubuntu-latest
139-
name: ubuntu / stable / test
138+
name: ubuntu / stable / test / ${{ matrix.crate }}
139+
strategy:
140+
fail-fast: false
141+
matrix:
142+
crate:
143+
- battery-service
144+
- cfu-service
145+
- embedded-services
146+
- espi-service
147+
- hid-service
148+
- platform-service
149+
- power-button-service
150+
- power-policy-service
151+
- storage_bus
152+
- type-c-service
140153
steps:
141154
- uses: actions/checkout@v4
142155
with:
143156
submodules: true
144157
- name: Install stable
145158
uses: dtolnay/rust-toolchain@stable
146159
- name: cargo test
147-
run: cargo test --locked
160+
run: cargo test --locked -p ${{ matrix.crate }}
148161

149162
msrv:
150163
# check that we can build using the minimal rust version that is specified by this crate

Cargo.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

embedded-service/Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ cortex-m.workspace = true
4444
embassy-sync = { workspace = true, features = ["std"] }
4545
critical-section = { workspace = true, features = ["std"] }
4646
embassy-futures.workspace = true
47+
embassy-time = { workspace = true, features = ["std"] }
48+
embassy-time-driver = { workspace = true }
49+
embassy-executor = { workspace = true, features = [
50+
"arch-std",
51+
"executor-thread",
52+
] }
4753

4854
[features]
4955
default = []

0 commit comments

Comments
 (0)