mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-26 15:00:48 +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.
95 lines
3.1 KiB
YAML
95 lines
3.1 KiB
YAML
name: "SFTP Integration Tests"
|
|
|
|
on:
|
|
push:
|
|
branches: [ master, main ]
|
|
paths:
|
|
- 'weed/sftpd/**'
|
|
- 'weed/command/sftp.go'
|
|
- 'test/sftp/**'
|
|
- '.github/workflows/sftp-tests.yml'
|
|
pull_request:
|
|
branches: [ master, main ]
|
|
paths:
|
|
- 'weed/sftpd/**'
|
|
- 'weed/command/sftp.go'
|
|
- 'test/sftp/**'
|
|
- '.github/workflows/sftp-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
|
|
|
|
env:
|
|
TEST_TIMEOUT: '15m'
|
|
|
|
jobs:
|
|
sftp-integration:
|
|
name: SFTP Integration Testing
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 20
|
|
|
|
steps:
|
|
- name: Checkout 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' }}
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y openssh-client
|
|
|
|
- name: Build SeaweedFS
|
|
run: |
|
|
cd weed
|
|
go build -o weed .
|
|
chmod +x weed
|
|
./weed version
|
|
|
|
- name: Run SFTP Integration Tests
|
|
run: |
|
|
cd test/sftp
|
|
|
|
echo "🧪 Running SFTP integration tests..."
|
|
echo "============================================"
|
|
|
|
# Install test dependencies
|
|
go mod download
|
|
|
|
# Run all SFTP tests
|
|
go test -v -timeout=${{ env.TEST_TIMEOUT }} ./...
|
|
|
|
echo "============================================"
|
|
echo "✅ SFTP integration tests completed"
|
|
|
|
- name: Test Summary
|
|
if: always()
|
|
run: |
|
|
echo "## 🔐 SFTP Integration Test Summary" >> $GITHUB_STEP_SUMMARY
|
|
echo "" >> $GITHUB_STEP_SUMMARY
|
|
echo "### Test Coverage" >> $GITHUB_STEP_SUMMARY
|
|
echo "- ✅ **HomeDir Path Translation**: User home directory mapping (fixes #7470)" >> $GITHUB_STEP_SUMMARY
|
|
echo "- ✅ **File Operations**: Upload, download, delete" >> $GITHUB_STEP_SUMMARY
|
|
echo "- ✅ **Directory Operations**: Create, list, remove" >> $GITHUB_STEP_SUMMARY
|
|
echo "- ✅ **Large File Handling**: 1MB+ file support" >> $GITHUB_STEP_SUMMARY
|
|
echo "- ✅ **Path Edge Cases**: Unicode, trailing slashes, .. paths" >> $GITHUB_STEP_SUMMARY
|
|
echo "- ✅ **Admin Access**: Root user verification" >> $GITHUB_STEP_SUMMARY
|
|
echo "" >> $GITHUB_STEP_SUMMARY
|
|
echo "### Test Configuration" >> $GITHUB_STEP_SUMMARY
|
|
echo "| User | HomeDir | Permissions |" >> $GITHUB_STEP_SUMMARY
|
|
echo "|------|---------|-------------|" >> $GITHUB_STEP_SUMMARY
|
|
echo "| admin | / | Full access |" >> $GITHUB_STEP_SUMMARY
|
|
echo "| testuser | /sftp/testuser | Home directory only |" >> $GITHUB_STEP_SUMMARY
|
|
echo "| readonly | /public | Read-only |" >> $GITHUB_STEP_SUMMARY
|
|
|
|
|
|
|