From f5c7fc6e4854f3a92ae7b58db1d5d1ba75efcddc Mon Sep 17 00:00:00 2001 From: Nguyen Thai Date: Thu, 8 Jun 2023 18:13:50 +0700 Subject: [PATCH] Splited analyze and test report uploads --- .github/workflows/analyze-test.yaml | 21 +-------------------- .github/workflows/ci.yaml | 9 --------- .github/workflows/release.yaml | 6 ------ .github/workflows/test-reports.yaml | 22 ++++++++++++++++++++++ 4 files changed, 23 insertions(+), 35 deletions(-) create mode 100644 .github/workflows/test-reports.yaml diff --git a/.github/workflows/analyze-test.yaml b/.github/workflows/analyze-test.yaml index f11beb129..665892498 100644 --- a/.github/workflows/analyze-test.yaml +++ b/.github/workflows/analyze-test.yaml @@ -1,5 +1,5 @@ on: - workflow_call: + pull_request: name: Analyze and test @@ -48,22 +48,3 @@ jobs: with: name: test-reports path: test-report*.json - - report: - runs-on: ubuntu-latest - if: success() || failure() # Always upload report - needs: - - analyze-test - steps: - - uses: actions/checkout@v3 - - - uses: actions/download-artifact@v3 - with: - name: test-reports - - - uses: dorny/test-reporter@v1 - with: - name: Flutter Tests - path: "*.json" - reporter: flutter-json - only-summary: "true" diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 70d2cd191..42d02c2a1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,20 +1,11 @@ on: workflow_dispatch: - pull_request: - paths-ignore: - - ".github/**" name: CI jobs: - analyze-test: - name: Analyze and test - uses: ./.github/workflows/analyze-test.yaml - build-app: name: Build app - needs: - - analyze-test runs-on: ${{ matrix.runner }} strategy: matrix: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 08ed5c472..dd9baf96f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -6,15 +6,9 @@ on: name: Release jobs: - analyze-test: - name: Analyze and test - uses: ./.github/workflows/analyze-test.yaml - release: name: Release if: startsWith(github.ref, 'refs/tags/v') - needs: - - analyze-test runs-on: ${{ matrix.runner }} strategy: matrix: diff --git a/.github/workflows/test-reports.yaml b/.github/workflows/test-reports.yaml new file mode 100644 index 000000000..a4e27cc06 --- /dev/null +++ b/.github/workflows/test-reports.yaml @@ -0,0 +1,22 @@ +on: + workflow_run: + workflows: + - "Analyze and test" + types: + - completed + +name: Test Reports + +jobs: + upload-reports: + name: Upload test reports + runs-on: ubuntu-latest + if: success() || failure() # Always upload report + steps: + - uses: dorny/test-reporter@v1 + with: + artifact: test-reports + name: Flutter Tests + path: "*.json" + reporter: flutter-json + only-summary: "true"