Skip to content

Commit c372ff9

Browse files
authored
Make sure unit_tests don't fail if no modules are affected (#7315)
The unit tests CI workflow has been failing when no modules were affected. See https://github.com/firebase/firebase-android-sdk/actions/runs/17332506204/job/49221502380?pr=7303 as an example The solution has been to fully skip jobs in the workflow when there are no affected jobs.
1 parent 67357f5 commit c372ff9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/ci_tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
runs-on: ubuntu-22.04
3939
needs:
4040
- determine_changed
41+
if: ${{ needs.determine_changed.outputs.modules != '[]' }}
4142
strategy:
4243
fail-fast: false
4344
matrix:
@@ -89,12 +90,11 @@ jobs:
8990
# to be used as a required check for merging.
9091
check_all:
9192
runs-on: ubuntu-22.04
92-
if: always()
9393
name: Unit Tests (matrix)
9494
needs: unit_tests
95+
if: ${{ failure() }}
9596
steps:
96-
- name: Check test matrix
97-
if: needs.unit_tests.result != 'success'
97+
- name: Check test matrix results
9898
run: exit 1
9999

100100

0 commit comments

Comments
 (0)