aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/s3-filer-group-tests.yml
blob: a4711005f6847ed3f290baf2712606720ca3c7e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: "S3 Filer Group Tests"

on:
  pull_request:
  
concurrency:
  group: ${{ github.head_ref }}/s3-filer-group-tests
  cancel-in-progress: true

permissions:
  contents: read

defaults:
  run:
    working-directory: weed

jobs:
  s3-filer-group-tests:
    name: S3 Filer Group Integration Tests
    runs-on: ubuntu-22.04
    timeout-minutes: 20
    
    steps:
      - name: Check out code
        uses: actions/checkout@v6

      - name: Set up Go
        uses: actions/setup-go@v6
        with:
          go-version-file: 'go.mod'
        id: go

      - name: Install SeaweedFS
        run: |
          go install -buildvcs=false

      - name: Run S3 Filer Group Tests
        timeout-minutes: 15
        working-directory: test/s3/filer_group
        run: |
          set -x
          echo "=== System Information ==="
          uname -a
          free -h
          df -h
          echo "=== Starting Filer Group Tests ==="
          
          # Run tests with automatic server management
          # The test-with-server target handles server startup/shutdown automatically
          # Server is started with -filer.group=testgroup
          make test-with-server || {
            echo "❌ Filer group tests failed, checking logs..."
            if [ -f weed-test.log ]; then
              echo "=== Server logs ==="
              tail -100 weed-test.log
            fi
            echo "=== Process information ==="
            ps aux | grep -E "(weed|test)" || true
            exit 1
          }

      - name: Show server logs on failure
        if: failure()
        working-directory: test/s3/filer_group
        run: |
          echo "=== Server Logs ==="
          if [ -f weed-test.log ]; then
            echo "Last 100 lines of server logs:"
            tail -100 weed-test.log
          else
            echo "No server log file found"
          fi
          
          echo "=== Test Environment ==="
          ps aux | grep -E "(weed|test)" || true
          netstat -tlnp | grep -E "(8333|9333|8080)" || true

      - name: Upload test logs on failure
        if: failure()
        uses: actions/upload-artifact@v5
        with:
          name: s3-filer-group-test-logs
          path: test/s3/filer_group/weed-test*.log
          retention-days: 3