Skip to content

Commit

Permalink
Splited analyze and test report uploads
Browse files Browse the repository at this point in the history
  • Loading branch information
tk-nguyen committed Jun 8, 2023
1 parent db6a428 commit f5c7fc6
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 35 deletions.
21 changes: 1 addition & 20 deletions .github/workflows/analyze-test.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
on:
workflow_call:
pull_request:

name: Analyze and test

Expand Down Expand Up @@ -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"
9 changes: 0 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/test-reports.yaml
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit f5c7fc6

Please sign in to comment.