Skip to content

Commit 42996c6

Browse files
More CI fixes
1 parent 4ddd8d1 commit 42996c6

File tree

3 files changed

+26
-3
lines changed

3 files changed

+26
-3
lines changed

.github/workflows/test.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# GENERATED: this file is generated by https://github.com/facet-rs/facet-dev
2+
13
name: Tests
24

35
on:
@@ -28,7 +30,15 @@ jobs:
2830
echo "::endgroup::"
2931
3032
echo "::group::Doc tests"
31-
cargo test --doc --all-features
33+
output=$(cargo test --doc --all-features 2>&1) || exit_code=$?
34+
if [ "${exit_code:-0}" -ne 0 ]; then
35+
if [ $exit_code -eq 101 ] && echo "$output" | grep -q "no library targets found in package"; then
36+
echo "No library targets found, skipping doc tests"
37+
else
38+
echo "$output"
39+
exit $exit_code
40+
fi
41+
fi
3242
echo "::endgroup::"
3343
3444
msrv:

Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,14 @@ edition = "2021"
66
description = "Internal development utilities for Facet"
77
keywords = ["code-generation", "templates"]
88
categories = ["development-tools"]
9+
rust-version = "1.88"
910

1011
[dependencies]
1112
fs-err = "3.1.0"
1213
log = { version = "0.4.27", features = ["std"] }
1314
owo-colors = "4.2.1"
1415

1516
[dev-dependencies]
16-
cargo-husky = { version = "1.5.0", default-features = false, features = ["user-hooks"] }
17+
cargo-husky = { version = "1.5.0", default-features = false, features = [
18+
"user-hooks",
19+
] }

src/.github/workflows/test.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# GENERATED: this file is generated by https://github.com/facet-rs/facet-dev
2+
13
name: Tests
24

35
on:
@@ -28,7 +30,15 @@ jobs:
2830
echo "::endgroup::"
2931
3032
echo "::group::Doc tests"
31-
cargo test --doc --all-features
33+
output=$(cargo test --doc --all-features 2>&1) || exit_code=$?
34+
if [ "${exit_code:-0}" -ne 0 ]; then
35+
if [ $exit_code -eq 101 ] && echo "$output" | grep -q "no library targets found in package"; then
36+
echo "No library targets found, skipping doc tests"
37+
else
38+
echo "$output"
39+
exit $exit_code
40+
fi
41+
fi
3242
echo "::endgroup::"
3343
3444
msrv:

0 commit comments

Comments
 (0)