mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-04 18:17:16 +01:00
FilerSecurityContext reads jwt.filer_signing.key, jwt.filer_signing.read.key (with their expires_after_seconds, defaulting to 10 and 60 like the Go clients) and [filer.basic_auth] from security.toml, with setters to set them in code. getFilerAuthorizationHeaderValue returns the credential for a request to the filer's HTTP port: an HS256 token for the access level, minted like security.GenJwtForFilerServer, else the filer Basic Auth, else the existing [basic_auth] value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
63 lines
1.9 KiB
YAML
63 lines
1.9 KiB
YAML
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'
|
|
|
|
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/')) }}
|
|
|
|
jobs:
|
|
test:
|
|
name: Java Unit Tests
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
java: ['8', '11', '17', '21']
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v7
|
|
|
|
- name: Set up Java
|
|
uses: actions/setup-java@v6
|
|
with:
|
|
java-version: ${{ matrix.java }}
|
|
distribution: 'temurin'
|
|
cache: ${{ runner.environment == 'github-hosted' && '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,FilerJwtTest
|
|
|
|
- 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@v7
|
|
with:
|
|
name: test-reports-java-${{ matrix.java }}
|
|
path: |
|
|
other/java/client/target/surefire-reports/
|
|
other/java/hdfs3/target/surefire-reports/
|
|
|