Skip to content

Commit 663c46f

Browse files
committed
Github CI with rust/Cargo.toml workspace
1 parent 6b23226 commit 663c46f

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

Diff for: .github/workflows/rust.yml

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Sourced from https://github.com/actions-rs/meta/blob/master/recipes/quickstart.md#
22
name: Rust
33
on: [push, pull_request]
4+
defaults:
5+
run:
6+
working-directory: rust
47
jobs:
58
check:
69
name: Check
@@ -12,7 +15,7 @@ jobs:
1215
profile: minimal
1316
toolchain: stable
1417
override: true
15-
- run: cd rust/hello-world && cargo check
18+
- run: cargo check
1619

1720
test:
1821
name: Test Suite
@@ -24,7 +27,7 @@ jobs:
2427
profile: minimal
2528
toolchain: stable
2629
override: true
27-
- run: cd rust/hello-world && cargo test
30+
- run: cargo test
2831

2932
fmt:
3033
name: Rustfmt
@@ -37,7 +40,7 @@ jobs:
3740
toolchain: stable
3841
override: true
3942
- run: rustup component add rustfmt
40-
- run: cd rust/hello-world && cargo fmt --all -- --check
43+
- run: cargo fmt --all -- --check
4144

4245
clippy:
4346
name: Clippy
@@ -50,4 +53,4 @@ jobs:
5053
toolchain: stable
5154
override: true
5255
- run: rustup component add clippy
53-
- run: cd rust/hello-world && cargo clippy -- --D warnings
56+
- run: cargo clippy -- --D warnings

Diff for: rust/Cargo.toml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[workspace]
2+
3+
members = [
4+
"assembly-line/",
5+
"hello-world/",
6+
"leap/",
7+
"lucians-luscious-lasagna/",
8+
"semi-structured-logs/",
9+
]

0 commit comments

Comments
 (0)