mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-26 06:50:45 +01:00
GitHub is retiring ubuntu-22.04; move all 94 runs-on pins across 40 workflows to ubuntu-24.04. rust_binaries_release: the arm64 cross step was jammy-era — noble keeps apt sources in deb822 ubuntu.sources (the sources.list edit was a silent no-op that left amd64 repos open to arm64 and 404'd) and ports suites must say noble. Pin deb822 stanzas to amd64 and add noble ports entries.
115 lines
3.3 KiB
YAML
115 lines
3.3 KiB
YAML
name: "TUS Protocol Tests"
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'weed/server/**'
|
|
- 'weed/filer/**'
|
|
- 'test/tus/**'
|
|
- 'go.mod'
|
|
- 'go.sum'
|
|
- '.github/workflows/tus-tests.yml'
|
|
|
|
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
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: weed
|
|
|
|
jobs:
|
|
tus-integration-tests:
|
|
name: TUS Protocol Integration Tests
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 20
|
|
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v7
|
|
|
|
- name: Clean up stale FUSE mounts
|
|
uses: ./.github/actions/cleanup-stale-fuse-mounts
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v7
|
|
with:
|
|
go-version-file: 'go.mod'
|
|
cache: ${{ runner.environment == 'github-hosted' }}
|
|
id: go
|
|
|
|
- name: Install SeaweedFS
|
|
run: |
|
|
go install -buildvcs=false
|
|
|
|
- name: Run TUS Integration Tests
|
|
timeout-minutes: 15
|
|
working-directory: test/tus
|
|
run: |
|
|
set -x
|
|
echo "=== System Information ==="
|
|
uname -a
|
|
free -h
|
|
timeout 15 df -h || true
|
|
echo "=== Starting TUS Tests ==="
|
|
|
|
# Run tests with automatic server management
|
|
make test-with-server || {
|
|
echo "TUS integration tests failed, checking logs..."
|
|
if [ -f /tmp/seaweedfs-tus-filer.log ]; then
|
|
echo "=== Filer logs ==="
|
|
tail -100 /tmp/seaweedfs-tus-filer.log
|
|
fi
|
|
if [ -f /tmp/seaweedfs-tus-master.log ]; then
|
|
echo "=== Master logs ==="
|
|
tail -50 /tmp/seaweedfs-tus-master.log
|
|
fi
|
|
if [ -f /tmp/seaweedfs-tus-volume.log ]; then
|
|
echo "=== Volume logs ==="
|
|
tail -50 /tmp/seaweedfs-tus-volume.log
|
|
fi
|
|
exit 1
|
|
}
|
|
|
|
- name: Show server logs on failure
|
|
if: failure()
|
|
working-directory: test/tus
|
|
run: |
|
|
echo "=== Filer Server Logs ==="
|
|
if [ -f /tmp/seaweedfs-tus-filer.log ]; then
|
|
echo "Last 100 lines of filer logs:"
|
|
tail -100 /tmp/seaweedfs-tus-filer.log
|
|
else
|
|
echo "No filer log file found"
|
|
fi
|
|
|
|
echo "=== Master Server Logs ==="
|
|
if [ -f /tmp/seaweedfs-tus-master.log ]; then
|
|
tail -50 /tmp/seaweedfs-tus-master.log
|
|
else
|
|
echo "No master log file found"
|
|
fi
|
|
|
|
echo "=== Volume Server Logs ==="
|
|
if [ -f /tmp/seaweedfs-tus-volume.log ]; then
|
|
tail -50 /tmp/seaweedfs-tus-volume.log
|
|
else
|
|
echo "No volume log file found"
|
|
fi
|
|
|
|
echo "=== Test Environment ==="
|
|
ps aux | grep -E "(weed|test)" || true
|
|
netstat -tlnp 2>/dev/null | grep -E "(18888|19333|18080)" || true
|
|
|
|
- name: Upload test logs on failure
|
|
if: failure()
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: tus-test-logs
|
|
path: |
|
|
/tmp/seaweedfs-tus-*.log
|
|
retention-days: 3
|