Skip to content

Commit c45e5aa

Browse files
committed
ci: add pfs-tool smoke-test job to ci-pfs.yml
The `pfs` CLI binary was previously excluded from coverage enforcement and never exercised in CI (only compiled). This job builds the binary and runs an end-to-end smoke test covering: mkfs, mkdir, put, ls, cat, verify, log, mv, rm, and create/update/extract round-trips. https://claude.ai/code/session_01DXSHc5tFLpwmHxKCxwySqM
1 parent aa9e09a commit c45e5aa

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

.github/workflows/ci-pfs.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,50 @@ jobs:
104104
with:
105105
name: pfs-ms-coverage-lcov
106106
path: reference/PFS-MS-v1.0/lcov.info
107+
108+
pfs-tool:
109+
name: pfs tool (smoke test)
110+
runs-on: ubuntu-latest
111+
steps:
112+
- uses: actions/checkout@v4
113+
- uses: dtolnay/rust-toolchain@stable
114+
- uses: Swatinem/rust-cache@v2
115+
with:
116+
workspaces: reference/PFS-MS-v1.0
117+
- name: Build pfs binary
118+
run: cargo build --bin pfs --verbose
119+
working-directory: reference/PFS-MS-v1.0
120+
- name: Smoke-test pfs CLI
121+
run: |
122+
PFS="$GITHUB_WORKSPACE/target/debug/pfs"
123+
124+
# mkfs + basic file and directory operations
125+
$PFS mkfs /tmp/t.pfs
126+
$PFS mkdir /tmp/t.pfs /docs
127+
printf 'hello world' | $PFS put /tmp/t.pfs /docs/hello.txt -
128+
$PFS ls /tmp/t.pfs
129+
$PFS verify /tmp/t.pfs
130+
$PFS log /tmp/t.pfs
131+
CONTENT=$($PFS cat /tmp/t.pfs /docs/hello.txt)
132+
test "$CONTENT" = "hello world"
133+
134+
# mv and rm
135+
$PFS mv /tmp/t.pfs /docs/hello.txt /docs/hello2.txt
136+
$PFS rm /tmp/t.pfs /docs/hello2.txt
137+
138+
# create → extract round-trip
139+
mkdir -p /tmp/src/sub
140+
printf 'file one' > /tmp/src/a.txt
141+
printf 'file two' > /tmp/src/sub/b.txt
142+
$PFS create /tmp/a.pfs /tmp/src --no-metadata
143+
$PFS verify /tmp/a.pfs
144+
mkdir /tmp/out
145+
$PFS extract /tmp/a.pfs /tmp/out --no-metadata
146+
diff -r /tmp/src /tmp/out
147+
148+
# update → extract round-trip after file modification
149+
printf 'file one v2' > /tmp/src/a.txt
150+
$PFS update /tmp/a.pfs /tmp/src --no-metadata
151+
rm -rf /tmp/out && mkdir /tmp/out
152+
$PFS extract /tmp/a.pfs /tmp/out --no-metadata
153+
diff -r /tmp/src /tmp/out

0 commit comments

Comments
 (0)