Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
b4020ba
fix: make kernel enforce perms based on mode
desertwitch Oct 16, 2025
3a7c529
fix: catch early direct -o arguments
desertwitch Oct 16, 2025
6a71ce1
feat(helper): argument to override log target
desertwitch Oct 17, 2025
4961a7f
feat(helper): refine args, arg to override timeout
desertwitch Oct 17, 2025
ff60ac8
chore(helper): documentation of arguments
desertwitch Oct 17, 2025
ad0e163
chore(helper): revise error messages
desertwitch Oct 17, 2025
ccb7a85
chore(main): error messages and code comments
desertwitch Oct 17, 2025
10d2b9d
feat(helper): signal mount error over pipe
desertwitch Oct 17, 2025
19cfc7f
feat(ci): add integration tests
desertwitch Oct 17, 2025
a19bffc
chore(helper): move texts to separate file
desertwitch Oct 17, 2025
446a398
fix(ci): revise scope of ci tests
desertwitch Oct 17, 2025
5553182
chore: documentation
desertwitch Oct 17, 2025
9f66335
fix(ci): use fusermount3 to unmount for fstab
desertwitch Oct 17, 2025
366e12e
fix(ci): additional unmount checks
desertwitch Oct 17, 2025
78ce03b
chore: documentation badges
desertwitch Oct 17, 2025
6c5b0ce
chore: documentation badges
desertwitch Oct 17, 2025
b1a94bd
fix(helper): do not swallow non-fatal signal error
desertwitch Oct 17, 2025
b61f8d2
fix(main): do not swallow signal error on exit
desertwitch Oct 17, 2025
49c99d4
fix(helper): use more descriptive overrides
desertwitch Oct 17, 2025
70ff9ab
fix(helper): marshal pipe comms as json
desertwitch Oct 17, 2025
6f0d5a7
chore(helper): refactor to use consts
desertwitch Oct 17, 2025
31deb47
chore(main): reword error message
desertwitch Oct 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/golang-build-debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ jobs:
cache: false
- name: Checkout code
uses: actions/checkout@v4
- name: Run all Go tests
run: make test
- name: Vendor the application for debug
run: make vendor
- name: Build the application for debug
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/golang-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ jobs:
cache: false
- name: Checkout code
uses: actions/checkout@v4
- name: Run all Go tests
run: make test
- name: Vendor the application for production
run: make vendor
- name: Build the application for production
Expand Down
237 changes: 237 additions & 0 deletions .github/workflows/zipfuse-cli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,237 @@
name: zipfuse-cli
on:
push:
branches:
- master
- main
pull_request:
permissions:
contents: read
jobs:
zipfuse:
name: cli
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.25.1'

- name: Install FUSE
run: |
sudo apt-get update
sudo apt-get install -y fuse3
sudo sed -i 's/#user_allow_other/user_allow_other/' /etc/fuse.conf

- name: Vendor dependencies
run: make vendor

- name: Build debug binaries
run: make debug

- name: Install debug binaries
run: |
sudo cp zipfuse /bin/zipfuse
sudo chmod +x /bin/zipfuse
sudo cp mount.zipfuse /sbin/mount.zipfuse
sudo chmod +x /sbin/mount.zipfuse

- name: Create test environment
run: |
mkdir -p source
mkdir -p mountpoint

mkdir -p test1/subdir1/subdir2
echo "Hello from test1.txt" > test1/test1.txt
echo "Second file in test1" > test1/file2.txt
echo "File in subdir1" > test1/subdir1/nested1.txt
echo "File in subdir2" > test1/subdir1/subdir2/nested2.txt
(cd test1 && zip -r ../source/archive1.zip .)

mkdir -p test2/docs/reports
echo "Hello from test2.txt" > test2/test2.txt
echo "Another file in test2" > test2/another.txt
echo "Document file" > test2/docs/document.txt
echo "Report file" > test2/docs/reports/report.txt
(cd test2 && zip -r ../source/archive2.zip .)

rm -rf test1 test2

- name: Mount filesystem
run: |
sudo sh -c 'nohup zipfuse source mountpoint --allow-other &>/var/log/zipfuse.log &'

for i in {1..20}; do
if mountpoint -q mountpoint; then
echo "Filesystem mounted successfully"
break
fi
if [ $i -eq 30 ]; then
echo "Mount timeout"
exit 1
fi
sleep 0.5
done

mount | grep zipfuse || true
ls -la mountpoint/

- name: Test filesystem
run: |
echo "Testing archive1..."
if [ ! -f "mountpoint/archive1/test1.txt" ]; then
echo "ERROR: test1.txt not found in archive1"
exit 1
fi

CONTENT1=$(cat mountpoint/archive1/test1.txt)
if [ "$CONTENT1" != "Hello from test1.txt" ]; then
echo "ERROR: Content mismatch in test1.txt"
echo "Expected: 'Hello from test1.txt'"
echo "Got: '$CONTENT1'"
exit 1
fi
echo "archive1/test1.txt content verified"

CONTENT2=$(cat mountpoint/archive1/file2.txt)
if [ "$CONTENT2" != "Second file in test1" ]; then
echo "ERROR: Content mismatch in file2.txt"
echo "Expected: 'Second file in test1'"
echo "Got: '$CONTENT2'"
exit 1
fi
echo "archive1/file2.txt content verified"

CONTENT3=$(cat mountpoint/archive1/subdir1/nested1.txt)
if [ "$CONTENT3" != "File in subdir1" ]; then
echo "ERROR: Content mismatch in subdir1/nested1.txt"
echo "Expected: 'File in subdir1'"
echo "Got: '$CONTENT3'"
exit 1
fi
echo "archive1/subdir1/nested1.txt content verified"

CONTENT4=$(cat mountpoint/archive1/subdir1/subdir2/nested2.txt)
if [ "$CONTENT4" != "File in subdir2" ]; then
echo "ERROR: Content mismatch in subdir1/subdir2/nested2.txt"
echo "Expected: 'File in subdir2'"
echo "Got: '$CONTENT4'"
exit 1
fi
echo "archive1/subdir1/subdir2/nested2.txt content verified"

echo "Testing archive2..."
if [ ! -f "mountpoint/archive2/test2.txt" ]; then
echo "ERROR: test2.txt not found in archive2"
exit 1
fi

CONTENT5=$(cat mountpoint/archive2/test2.txt)
if [ "$CONTENT5" != "Hello from test2.txt" ]; then
echo "ERROR: Content mismatch in test2.txt"
echo "Expected: 'Hello from test2.txt'"
echo "Got: '$CONTENT5'"
exit 1
fi
echo "archive2/test2.txt content verified"

CONTENT6=$(cat mountpoint/archive2/another.txt)
if [ "$CONTENT6" != "Another file in test2" ]; then
echo "ERROR: Content mismatch in another.txt"
echo "Expected: 'Another file in test2'"
echo "Got: '$CONTENT6'"
exit 1
fi
echo "archive2/another.txt content verified"

CONTENT7=$(cat mountpoint/archive2/docs/document.txt)
if [ "$CONTENT7" != "Document file" ]; then
echo "ERROR: Content mismatch in docs/document.txt"
echo "Expected: 'Document file'"
echo "Got: '$CONTENT7'"
exit 1
fi
echo "archive2/docs/document.txt content verified"

CONTENT8=$(cat mountpoint/archive2/docs/reports/report.txt)
if [ "$CONTENT8" != "Report file" ]; then
echo "ERROR: Content mismatch in docs/reports/report.txt"
echo "Expected: 'Report file'"
echo "Got: '$CONTENT8'"
exit 1
fi
echo "archive2/docs/reports/report.txt content verified"

echo "All file content tests passed!"

- name: Unmount filesystem
if: always()
run: |
sudo killall zipfuse || true

for i in {1..10}; do
if ! mountpoint -q mountpoint; then
echo "Filesystem unmounted successfully"
break
fi
sleep 0.5
done

for i in {1..10}; do
if ! pgrep -fa zipfuse &>/dev/null; then
echo "Filesystem binary exited successfully"
exit 0
fi
sleep 0.5
done

echo "ERROR: Filesystem binary seems stuck after unmount"
exit 1

- name: Verify unmounted
if: always()
run: |
if mountpoint -q mountpoint; then
echo "ERROR: Filesystem still mounted after killall"
mount | grep zipfuse || true
exit 1
fi

if pgrep -fa zipfuse &>/dev/null; then
echo "ERROR: Filesystem binary still alive after unmount"
pgrep -fa zipfuse || true
exit 1
fi

if [ -f "mountpoint/archive1/test1.txt" ]; then
echo "ERROR: Files still accessible after unmount"
exit 1
fi

echo "Filesystem properly unmounted"

- name: Show logs on failure
if: failure()
run: |
echo "=== Mount points ==="
mount | grep zipfuse || echo "No zipfuse mounts found"
echo ""

echo "=== Mountpoint directory ==="
ls -la mountpoint/ || true
echo ""

echo "=== Process list ==="
ps aux | grep zipfuse || echo "No zipfuse processes found"
echo ""

echo "=== Dmesg (last 25 lines) ==="
sudo dmesg | tail -n 25 || true
echo ""

echo "=== ZipFUSE Events (last 25 lines) ==="
sudo cat /var/log/zipfuse.log | tail -n 25 || true
Loading
Loading