Skip to content

Commit cf3c27f

Browse files
authored
chore(examples): run cargo check for all examples before tests for some examples (#486)
1 parent 241b8d7 commit cf3c27f

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

examples/test.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ set -Cue
44

55
EXAMPLES=$(pwd)
66

7+
# First, check the buildability of all examples
8+
for directory in ./*/; do
9+
if [ "$(basename $directory)" != "target" ]; then
10+
cd $directory
11+
cargo check
12+
cd ..
13+
fi
14+
done
15+
16+
# Now, run tests for each example if needed
17+
718
cd $EXAMPLES/static_files && \
819
cargo test
920

examples/websocket/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ async fn main() {
143143
}
144144

145145
Ohkami::new((Logger,
146-
"/".Dir("./template").omit_extensions([".html"]),
146+
"/".Dir("./template").omit_extensions(&[".html"]),
147147
"/echo1".GET(echo_text),
148148
"/echo2/:name".GET(echo_text_2),
149149
"/echo3/:name".GET(echo_text_3),

0 commit comments

Comments
 (0)