mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-25 06:20:42 +01:00
PR-triggered workflows without a concurrency group keep running (and holding runner slots) after a force-push or quick follow-up commit supersedes them. Add the same group/cancel-in-progress block the go workflow already uses, keyed on head_ref, to the remaining PR workflows. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
63 lines
1.6 KiB
YAML
63 lines
1.6 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.head_ref }}/java_unit_tests
|
|
cancel-in-progress: true
|
|
|
|
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: '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/
|
|
|