aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/java_unit_tests.yml
blob: d31309f311c32b28885ef19edae52be01508c4df (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
name: Java Client Unit Tests

on:
  push:
    branches: [ master ]
    paths:
      - 'other/java/**'
      - '.github/workflows/java_unit_tests.yml'
  pull_request:
    branches: [ master ]
    paths:
      - 'other/java/**'
      - '.github/workflows/java_unit_tests.yml'

jobs:
  test:
    name: Java Unit Tests
    runs-on: ubuntu-latest
    
    strategy:
      matrix:
        java: ['8', '11', '17', '21']
    
    steps:
      - name: Checkout code
        uses: actions/checkout@v6
      
      - name: Set up Java
        uses: actions/setup-java@v5
        with:
          java-version: ${{ matrix.java }}
          distribution: 'temurin'
          cache: 'maven'
      
      - name: Build and Install SeaweedFS Client
        working-directory: other/java/client
        run: |
          mvn clean install -DskipTests -Dmaven.javadoc.skip=true -Dgpg.skip=true
      
      - name: Run Client Unit Tests
        working-directory: other/java/client
        run: |
          mvn test -Dtest=SeaweedReadTest,SeaweedCipherTest
      
      - name: Run HDFS3 Configuration Tests
        working-directory: other/java/hdfs3
        run: |
          mvn test -Dtest=SeaweedFileSystemConfigTest -Dmaven.javadoc.skip=true -Dgpg.skip=true
      
      - name: Upload Test Reports
        if: always()
        uses: actions/upload-artifact@v5
        with:
          name: test-reports-java-${{ matrix.java }}
          path: |
            other/java/client/target/surefire-reports/
            other/java/hdfs3/target/surefire-reports/