Skip to content

Commit 55aa0da

Browse files
marc0oloclaude
andcommitted
chore(rust/face-recognition): test.sh over Makefile, bump CI image to 1.0.1
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 30d9d23 commit 55aa0da

4 files changed

Lines changed: 26 additions & 37 deletions

File tree

.github/workflows/face-recognition.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ concurrency:
1515
jobs:
1616
rust-face-recognition:
1717
runs-on: ubuntu-24.04
18-
container: ghcr.io/dfinity/icp-dev-env-rust:1.0.0
18+
container: ghcr.io/dfinity/icp-dev-env-rust:1.0.1
1919
env:
2020
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2121
steps:
@@ -25,4 +25,4 @@ jobs:
2525
run: |
2626
icp network start -d
2727
icp deploy
28-
make test
28+
bash test.sh

rust/face-recognition/Makefile

Lines changed: 0 additions & 34 deletions
This file was deleted.

rust/face-recognition/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ cd examples/rust/face-recognition
6868
```bash
6969
icp network start -d
7070
icp deploy
71-
make test
71+
bash test.sh
7272
icp network stop
7373
```
7474

rust/face-recognition/test.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
4+
echo "=== Test 1: clear_face_detection_model_bytes returns unit ==="
5+
result=$(icp canister call backend clear_face_detection_model_bytes '()') && \
6+
echo "$result" && \
7+
echo "PASS" || (echo "FAIL" && exit 1)
8+
9+
echo "=== Test 2: clear_face_recognition_model_bytes returns unit ==="
10+
result=$(icp canister call backend clear_face_recognition_model_bytes '()') && \
11+
echo "$result" && \
12+
echo "PASS" || (echo "FAIL" && exit 1)
13+
14+
echo "=== Test 3: append_face_detection_model_bytes accepts bytes ==="
15+
result=$(icp canister call backend append_face_detection_model_bytes '(blob "\00\01\02")') && \
16+
echo "$result" && \
17+
echo "PASS" || (echo "FAIL" && exit 1)
18+
19+
echo "=== Test 4: run_detection returns Err when model is not set up ==="
20+
result=$(icp canister call --query backend run_detection '()') && \
21+
echo "$result" && \
22+
echo "$result" | grep -q 'Err' && \
23+
echo "PASS" || (echo "FAIL" && exit 1)

0 commit comments

Comments
 (0)