From 33a5229c1c70b2af41156e73f1dd5bad827fd385 Mon Sep 17 00:00:00 2001 From: yunhong <337361684@qq.com> Date: Tue, 13 May 2025 11:20:02 +0800 Subject: [PATCH] [ci] upload jacoco report when running main branch --- .github/workflows/ci.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b201c4116e..bc882b5f06 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -45,6 +45,7 @@ jobs: timeout-minutes: 60 run: | TEST_MODULES=$(./.github/workflows/stage.sh ${{ matrix.module }}) + echo "github ref: ${{ github.ref }}" echo "Start testing modules: $TEST_MODULES" mvn -B verify $TEST_MODULES -Ptest-coverage -Ptest-${{ matrix.module }} -Dlog.dir=${{ runner.temp }}/fluss-logs -Dlog4j.configurationFile=${{ github.workspace }}/tools/ci/log4j.properties env: @@ -61,4 +62,10 @@ jobs: if: ${{ failure() }} with: name: logs-test-${{ matrix.module }}-${{ github.run_number}}#${{ github.run_attempt }} - path: ${{ runner.temp }}/fluss-logs/* \ No newline at end of file + path: ${{ runner.temp }}/fluss-logs/* + - name: Upload JaCoCo coverage report + uses: actions/upload-artifact@v4 + if: ${{ success() && github.ref == 'refs/heads/main' }} + with: + name: jacoco-report-${{ matrix.module }}-${{ github.run_number}}#${{ github.run_attempt }} + path: ${{ github.workspace }}/fluss-test-coverage/target/site/jacoco-aggregate/* \ No newline at end of file