Browse Source

Update to enable pod tests in post submit tests. (#7451)

Gran 5 năm trước cách đây
mục cha
commit
8197ddb23f
1 tập tin đã thay đổi với 7 bổ sung6 xóa
  1. 7 6
      .github/workflows/test_coverage.yml

+ 7 - 6
.github/workflows/test_coverage.yml

@@ -5,11 +5,11 @@ on:
     # open will be triggered when a pull request is created.
     # synchronize will be triggered when a pull request has new commits.
     # closed will be triggered when a pull request is closed.
-    types: [open, synchronize, closed]
+    types: [opened, synchronize, closed]
 
 jobs:
   check:
-    if: github.repository == 'Firebase/firebase-ios-sdk' && github.event.action == 'synchronize'
+    if: github.repository == 'Firebase/firebase-ios-sdk' && (github.event.action == 'opened' || github.event.action == 'synchronize')
     name: Check changed files
     outputs:
       database_run_job: ${{ steps.check_files.outputs.database_run_job }}
@@ -28,9 +28,10 @@ jobs:
         run: ./scripts/code_coverage_report/get_updated_files.sh
 
   pod-lib-lint-database:
-    # Don't run on private repo unless it is a PR.
-    if: github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.database_run_job == 'true' || github.event.pull_request.merged == true)
     needs: check
+    # Don't run on private repo unless it is a PR.
+    # always() will trigger this job when `needs` are skipped in a `merge` pull_request event.
+    if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.database_run_job == 'true' || github.event.pull_request.merged)
     runs-on: macOS-latest
     strategy:
       matrix:
@@ -47,9 +48,9 @@ jobs:
         path: /Users/runner/*.xcresult
 
   pod-lib-lint-functions:
-    # Don't run on private repo unless it is a PR.
-    if: github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.functions_run_job == 'true' || github.event.pull_request.merged == true)
     needs: check
+    # Don't run on private repo unless it is a PR.
+    if: always() && github.repository == 'Firebase/firebase-ios-sdk' && (needs.check.outputs.functions_run_job == 'true'|| github.event.pull_request.merged)
     runs-on: macOS-latest
     strategy:
       matrix: