mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-24 23:10:41 +02:00
Follow-up to #11985/#11986: setup-go/setup-java/setup-python steps added or restructured since (e.g. by #11981's shared-artifact layout) were missed. On self-hosted runners setup-go restores/saves a ~5GB module cache archive per job — pure waste when the module cache is already on local disk — and the restore blocks the job for minutes.
63 lines
1.8 KiB
YAML
63 lines
1.8 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
|
|
|
|
- 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/
|
|
|