name: "FUSE Mount Handover Tests" on: pull_request: paths: - 'weed/command/mount*.go' - 'weed/mount/**' - 'weed/pb/mount_handover_pb/**' - 'test/fuse_handover/**' - '.github/workflows/fuse-handover.yml' - '.github/actions/fix-fusermount-setuid/**' push: branches: [master] paths: - 'weed/command/mount*.go' - 'weed/mount/**' - 'weed/pb/mount_handover_pb/**' - 'test/fuse_handover/**' - '.github/actions/fix-fusermount-setuid/**' concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.event_name == 'push' && github.ref) || github.run_id }} cancel-in-progress: ${{ github.event_name == 'pull_request' || (github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/')) }} permissions: contents: read jobs: fuse-handover: name: FUSE Mount Handover Tests runs-on: ubuntu-24.04 timeout-minutes: 30 steps: - name: Check out code uses: actions/checkout@v7 - name: Set up Go uses: actions/setup-go@v7 with: go-version-file: 'go.mod' cache: ${{ runner.environment == 'github-hosted' }} # The tests mount as the runner user through fusermount3, without # allow_other: nothing to install or configure besides the setuid bit. - name: Repair the fusermount3 setuid bit uses: ./.github/actions/fix-fusermount-setuid - name: Build SeaweedFS run: go build -o weed/weed -buildvcs=false ./weed - name: Run handover tests timeout-minutes: 25 env: WEED_BINARY: ${{ github.workspace }}/weed/weed run: go test -v -count=1 -timeout=20m ./test/fuse_handover/... # A failed test keeps the weed logs in /tmp/fuse_handover_*. - name: Upload logs on failure if: failure() uses: actions/upload-artifact@v7 with: name: fuse-handover-test-logs path: /tmp/fuse_handover_*/*.log retention-days: 3