From 6a6a09fb957f4955260c3a8a0364315d4e068d1f Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Thu, 18 Mar 2021 18:29:52 -0700 Subject: [PATCH 01/13] Extra chance to add failure label. --- .github/workflows/integration_tests.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index a3ff879b92..a945343435 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -357,6 +357,14 @@ jobs: token: ${{secrets.GITHUB_TOKEN}} label: "${{ env.statusLabelInProgress }}" type: remove + - name: add failure label + # We can do this as soon as a test fails. + if: ${{ needs.check_trigger.outputs.should_update_labels && failure() }} + uses: buildsville/add-remove-label@v1 + with: + token: ${{secrets.GITHUB_TOKEN}} + label: "${{ env.statusLabelFailed }}" + type: add - name: add success label # Must wait for all tests to finish before marking successful. if: ${{ needs.check_trigger.outputs.should_update_labels && success() }} From 9e3ee9f9ac2f68996de80359b169e5ac824453a4 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Thu, 18 Mar 2021 18:42:26 -0700 Subject: [PATCH 02/13] Re-add auth change. --- auth/src/ios/auth_ios.mm | 2 ++ scripts/gha/print_matrix_configuration.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/auth/src/ios/auth_ios.mm b/auth/src/ios/auth_ios.mm index 17b8236829..2e099efa1a 100644 --- a/auth/src/ios/auth_ios.mm +++ b/auth/src/ios/auth_ios.mm @@ -29,6 +29,8 @@ #include "app/src/util_ios.h" #include "auth/src/ios/common_ios.h" +// Test auth change. + // Wraps AuthData with an Obj-C object so that it's possible to remove // the authData from any blocks that reference this handle. @interface FIRCPPAuthListenerHandle : NSObject diff --git a/scripts/gha/print_matrix_configuration.py b/scripts/gha/print_matrix_configuration.py index ff1ff1e787..c7a2127601 100644 --- a/scripts/gha/print_matrix_configuration.py +++ b/scripts/gha/print_matrix_configuration.py @@ -191,7 +191,7 @@ def filter_values_on_diff(parm_key, value, auto_diff): Remove entries from the list based on what we observe in the source tree, relative to the given base branch.""" file_list = set(subprocess.check_output(['git', 'diff', '--name-only', auto_diff]).decode('utf-8').rstrip('\n').split('\n')) - + print(file_list) if parm_key == 'apis': custom_triggers = { # Ones set to None are ignored. From 34d134b3f22ac42454a1f2d68908d34e0c6a5436 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Thu, 18 Mar 2021 18:44:14 -0700 Subject: [PATCH 03/13] Remove extra debug text. --- scripts/gha/print_matrix_configuration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gha/print_matrix_configuration.py b/scripts/gha/print_matrix_configuration.py index c7a2127601..ff1ff1e787 100644 --- a/scripts/gha/print_matrix_configuration.py +++ b/scripts/gha/print_matrix_configuration.py @@ -191,7 +191,7 @@ def filter_values_on_diff(parm_key, value, auto_diff): Remove entries from the list based on what we observe in the source tree, relative to the given base branch.""" file_list = set(subprocess.check_output(['git', 'diff', '--name-only', auto_diff]).decode('utf-8').rstrip('\n').split('\n')) - print(file_list) + if parm_key == 'apis': custom_triggers = { # Ones set to None are ignored. From 386426bc4e2868b39ac7bd1b816bf6337b68a28f Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Fri, 19 Mar 2021 00:54:26 -0700 Subject: [PATCH 04/13] Change the test from auth ios to functions desktop. --- auth/src/ios/auth_ios.mm | 2 -- functions/src/desktop/functions_desktop.cc | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/auth/src/ios/auth_ios.mm b/auth/src/ios/auth_ios.mm index 2e099efa1a..17b8236829 100644 --- a/auth/src/ios/auth_ios.mm +++ b/auth/src/ios/auth_ios.mm @@ -29,8 +29,6 @@ #include "app/src/util_ios.h" #include "auth/src/ios/common_ios.h" -// Test auth change. - // Wraps AuthData with an Obj-C object so that it's possible to remove // the authData from any blocks that reference this handle. @interface FIRCPPAuthListenerHandle : NSObject diff --git a/functions/src/desktop/functions_desktop.cc b/functions/src/desktop/functions_desktop.cc index d438c63e78..1d9b71e27e 100644 --- a/functions/src/desktop/functions_desktop.cc +++ b/functions/src/desktop/functions_desktop.cc @@ -18,6 +18,8 @@ #include "app/src/reference_counted_future_impl.h" #include "functions/src/desktop/callable_reference_desktop.h" +// Functions desktop only change. + namespace firebase { namespace functions { namespace internal { From 92da8642430d8bd468eefd9fb3a3c72fa7b0a9b7 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Fri, 19 Mar 2021 01:04:37 -0700 Subject: [PATCH 05/13] Change the triggered tests. --- functions/src/desktop/functions_desktop.cc | 2 -- functions/src/ios/functions_ios.mm | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/src/desktop/functions_desktop.cc b/functions/src/desktop/functions_desktop.cc index 1d9b71e27e..d438c63e78 100644 --- a/functions/src/desktop/functions_desktop.cc +++ b/functions/src/desktop/functions_desktop.cc @@ -18,8 +18,6 @@ #include "app/src/reference_counted_future_impl.h" #include "functions/src/desktop/callable_reference_desktop.h" -// Functions desktop only change. - namespace firebase { namespace functions { namespace internal { diff --git a/functions/src/ios/functions_ios.mm b/functions/src/ios/functions_ios.mm index 95ab992eea..8da24103b1 100644 --- a/functions/src/ios/functions_ios.mm +++ b/functions/src/ios/functions_ios.mm @@ -14,6 +14,8 @@ #include "functions/src/ios/functions_ios.h" +// Functions iOS only change. + #import "FIRFunctions.h" #include "app/memory/unique_ptr.h" #include "app/src/app_ios.h" From 1a5ac48ef00834cbf386627e66204517a8742394 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Fri, 19 Mar 2021 02:03:18 -0700 Subject: [PATCH 06/13] Add time to message. --- .github/workflows/integration_tests.yml | 32 ++++++++++++++++++------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index c368264cad..3f375fa896 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -69,15 +69,15 @@ jobs: uses: andymckay/cancel-action@0.2 - name: wait for above cancellation if label is irrelevant if: ${{ !startsWith(github.event.label.name, env.triggerLabelPrefix) }} - run: sleep 300 + run: | + sleep 300 + exit 1 # fail out if the cancellation above somehow failed. ### Below this line, the label is one of the test-request triggers. - name: cancel previous runs on the same PR - if: ${{ startsWith(github.event.label.name, env.triggerLabelPrefix) }} uses: styfle/cancel-workflow-action@0.8.0 with: access_token: ${{ github.token }} - name: remove triggering label - if: ${{ startsWith(github.event.label.name, env.triggerLabelPrefix) }} uses: buildsville/add-remove-label@v1 with: token: ${{ github.token }} @@ -85,14 +85,12 @@ jobs: type: remove ### Fail the workflow if the user does not have admin access to run the tests. - name: check if user has permission to trigger tests - if: ${{ startsWith(github.event.label.name, env.triggerLabelPrefix) }} uses: lannonbr/repo-permission-check-action@2.0.0 with: permission: "admin" env: GITHUB_TOKEN: ${{ github.token }} - id: set_outputs - if: ${{ startsWith(github.event.label.name, env.triggerLabelPrefix) }} run: | echo "::set-output name=should_update_labels::1" if [[ "${{ github.event.label.name }}" == "${{ env.triggerLabelFull }}" ]]; then @@ -102,32 +100,35 @@ jobs: fi ### Add the in-progress label and remove any previous success/fail labels. - name: add in-progress label - if: ${{ startsWith(github.event.label.name, env.triggerLabelPrefix) }} uses: buildsville/add-remove-label@v1 with: token: ${{ github.token }} label: "${{ env.statusLabelInProgress }}" type: add - name: remove previous success label - if: ${{ startsWith(github.event.label.name, env.triggerLabelPrefix) }} uses: buildsville/add-remove-label@v1 with: token: ${{ github.token }} label: "${{ env.statusLabelSucceeded }}" type: remove - name: remove previous failure label - if: ${{ startsWith(github.event.label.name, env.triggerLabelPrefix) }} uses: buildsville/add-remove-label@v1 with: token: ${{ github.token }} label: "${{ env.statusLabelFailed }}" type: remove + - name: get current time for status comment + id: get-time + run: | + echo -n "::set-output name=time::" + TZ=America/Los_Angeles date - name: add in progress comment uses: phulsechinmay/rewritable-pr-comment@v0.2.1 with: message: | Integration test: *[in progress](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})* Requested by @${{github.actor}} on commit ${{github.sha}} + Last updated: ${{ steps.get-time.outputs.time }} GITHUB_TOKEN: ${{ github.token }} COMMENT_IDENTIFIER: "integration-test-status-comment" @@ -342,13 +343,19 @@ jobs: python scripts/gha/test_lab.py --android_model ${{ needs.prepare_matrix.outputs.android_device }} --android_api ${{ needs.prepare_matrix.outputs.android_api }} --ios_model ${{ needs.prepare_matrix.outputs.ios_device }} --ios_version ${{ needs.prepare_matrix.outputs.ios_version }} --testapp_dir testapps --code_platform cpp --key_file scripts/gha-encrypted/gcs_key_file.json - name: add failure label - # We can do this as soon as a test fails. + # We can do mark a failure as soon as any one test fails. if: ${{ needs.check_trigger.outputs.should_update_labels && failure() && !cancelled() }} uses: buildsville/add-remove-label@v1 with: token: ${{ github.token }} label: "${{ env.statusLabelFailed }}" type: add + - name: get current time for status comment + id: get-time + if: ${{ needs.check_trigger.outputs.should_update_labels && failure() && !cancelled() }} + run: | + echo -n "::set-output name=time::" + TZ=America/Los_Angeles date - name: add failure comment uses: phulsechinmay/rewritable-pr-comment@v0.2.1 if: ${{ needs.check_trigger.outputs.should_update_labels && failure() && !cancelled() }} @@ -356,6 +363,7 @@ jobs: message: | Integration test: **[failed](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})** Requested by @${{github.actor}} on commit ${{github.sha}} + Last updated: ${{ steps.get-time.outputs.time }} GITHUB_TOKEN: ${{ github.token }} COMMENT_IDENTIFIER: "integration-test-status-comment" @@ -401,11 +409,17 @@ jobs: token: ${{github.token}} label: "${{ env.statusLabelSucceeded }}" type: add + - name: get current time for status comment + id: get-time + run: | + echo -n "::set-output name=time::" + TZ=America/Los_Angeles date - name: add success comment uses: phulsechinmay/rewritable-pr-comment@v0.2.1 with: message: | Integration test: **[succeeded](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})** Requested by @${{github.actor}} on commit ${{github.sha}} + Last updated: ${{ steps.get-time.outputs.time }} GITHUB_TOKEN: ${{ github.token }} COMMENT_IDENTIFIER: "integration-test-status-comment" From 82572598e484845b0fd28b47483591351deaa555 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Fri, 19 Mar 2021 02:56:31 -0700 Subject: [PATCH 07/13] Modify the changed file to a readme. --- functions/src/ios/functions_ios.mm | 2 -- release_build_files/readme.md | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/src/ios/functions_ios.mm b/functions/src/ios/functions_ios.mm index 8da24103b1..95ab992eea 100644 --- a/functions/src/ios/functions_ios.mm +++ b/functions/src/ios/functions_ios.mm @@ -14,8 +14,6 @@ #include "functions/src/ios/functions_ios.h" -// Functions iOS only change. - #import "FIRFunctions.h" #include "app/memory/unique_ptr.h" #include "app/src/app_ios.h" diff --git a/release_build_files/readme.md b/release_build_files/readme.md index a9be9d8166..5add540712 100644 --- a/release_build_files/readme.md +++ b/release_build_files/readme.md @@ -1,5 +1,7 @@ # Firebase C++ SDK +Readme change to test empty matrix + The Firebase C++ SDK provides C++ interfaces for the following Firebase services on *iOS* and *Android*: From e6f35e6beb72bcc50f9ae09e9e7989a1804f2118 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Fri, 19 Mar 2021 03:48:24 -0700 Subject: [PATCH 08/13] Change modified file to a different one for testing android. --- build.gradle | 4 +++- release_build_files/readme.md | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 419432b8c4..c56ecd608d 100644 --- a/build.gradle +++ b/build.gradle @@ -1 +1,3 @@ -// This is intentionally empty, as no logic is needed in the root gradle file. \ No newline at end of file +// This is intentionally empty, as no logic is needed in the root gradle file. + +// What happens if we change this file? \ No newline at end of file diff --git a/release_build_files/readme.md b/release_build_files/readme.md index 5add540712..a9be9d8166 100644 --- a/release_build_files/readme.md +++ b/release_build_files/readme.md @@ -1,7 +1,5 @@ # Firebase C++ SDK -Readme change to test empty matrix - The Firebase C++ SDK provides C++ interfaces for the following Firebase services on *iOS* and *Android*: From 087e0f3d8e1a372bce08ef1bf51bcc32d153f62d Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Fri, 19 Mar 2021 09:04:01 -0700 Subject: [PATCH 09/13] Modify the changed part again. --- build.gradle | 4 +--- remote_config/src/desktop/config_data.cc | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index c56ecd608d..419432b8c4 100644 --- a/build.gradle +++ b/build.gradle @@ -1,3 +1 @@ -// This is intentionally empty, as no logic is needed in the root gradle file. - -// What happens if we change this file? \ No newline at end of file +// This is intentionally empty, as no logic is needed in the root gradle file. \ No newline at end of file diff --git a/remote_config/src/desktop/config_data.cc b/remote_config/src/desktop/config_data.cc index 3803f927bc..79834d9460 100644 --- a/remote_config/src/desktop/config_data.cc +++ b/remote_config/src/desktop/config_data.cc @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Try changing RC desktop. + #include "remote_config/src/desktop/config_data.h" #include "remote_config/src/desktop/metadata.h" #include "flatbuffers/flexbuffers.h" From f0138bb8af603e19b944b1f10fda784fa32c1f30 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Fri, 19 Mar 2021 13:50:44 -0700 Subject: [PATCH 10/13] When tests start, delete old status comment first. --- .github/workflows/integration_tests.yml | 27 +++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 549bf403a0..4930e7ca2c 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -49,6 +49,7 @@ env: statusLabelInProgress: "tests: in-progress" statusLabelFailed: "tests: failed" statusLabelSucceeded: "tests: succeeded" + statusCommentIdentifier: "integration-test-status-comment" jobs: check_trigger: @@ -117,13 +118,27 @@ jobs: token: ${{ github.token }} label: "${{ env.statusLabelFailed }}" type: remove + - name: find old status comment, if any + uses: peter-evans/find-comment@v1 + id: find-comment + with: + issue-number: ${{github.event.number}} + body-includes: ${{ env.statusCommentIdentifier }} + token: ${{github.token}} + - name: delete old status comment + if: ${{ steps.find-comment.outputs.comment-id != 0 }} + uses: jungwinter/comment@v1 + with: + type: delete + comment_id: ${{ steps.find-comment.outputs.comment-id }} + token: ${{ github.token }} - name: get current time for status comment id: get-time shell: bash run: | echo -n "::set-output name=time::" TZ=America/Los_Angeles date - - name: add in progress comment + - name: add in progress status comment uses: phulsechinmay/rewritable-pr-comment@v0.2.1 with: message: | @@ -132,7 +147,7 @@ jobs: Last updated: ${{ steps.get-time.outputs.time }} **[View integration test run](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})** GITHUB_TOKEN: ${{ github.token }} - COMMENT_IDENTIFIER: "integration-test-status-comment" + COMMENT_IDENTIFIER: ${{ env.statusCommentIdentifier }} # To feed input into the job matrix, we first need to convert to a JSON # list. Then we can use fromJson to define the field in the matrix for the tests job. @@ -359,7 +374,7 @@ jobs: run: | echo -n "::set-output name=time::" TZ=America/Los_Angeles date - - name: add failure comment + - name: add failure status comment uses: phulsechinmay/rewritable-pr-comment@v0.2.1 if: ${{ needs.check_trigger.outputs.should_update_labels && failure() && !cancelled() }} with: @@ -369,7 +384,7 @@ jobs: Last updated: ${{ steps.get-time.outputs.time }} **[View integration test results](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})** GITHUB_TOKEN: ${{ github.token }} - COMMENT_IDENTIFIER: "integration-test-status-comment" + COMMENT_IDENTIFIER: ${{ env.statusCommentIdentifier }} - name: Summarize build and test results if: ${{ !cancelled() }} @@ -398,7 +413,7 @@ jobs: run: | echo -n "::set-output name=time::" TZ=America/Los_Angeles date - - name: add success comment + - name: add success status comment uses: phulsechinmay/rewritable-pr-comment@v0.2.1 with: message: | @@ -407,7 +422,7 @@ jobs: Last updated: ${{ steps.get-time.outputs.time }} **[View integration test results](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})** GITHUB_TOKEN: ${{ github.token }} - COMMENT_IDENTIFIER: "integration-test-status-comment" + COMMENT_IDENTIFIER: ${{ env.statusCommentIdentifier }} remove_in_progress_label: name: "remove-in-progress-label" From ade1f8b165726e26e7b267e5f4e7a3138780333f Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Fri, 19 Mar 2021 14:02:30 -0700 Subject: [PATCH 11/13] Fix invalid shell syntax. --- .github/workflows/integration_tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index c854b208b1..06d9d130fa 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -181,9 +181,9 @@ jobs: - id: export-result # e.g. 'ubuntu-latest,macos-latest' -> '["ubuntu-latest","macos-latest"]' run: | - echo "::set-output name=apis::$( python scripts/gha/print_matrix_configuration.py -c -w integration_tests -k apis -o "${{github.event.inputs.apis}}" ${AUTO_DIFF_PARAM} - echo "::set-output name=matrix_platform::$( python scripts/gha/print_matrix_configuration.py -w integration_tests ${EXPANDED_MATRIX_PARAM} -k platform -o "${{github.event.inputs.platforms}}" ${AUTO_DIFF_PARAM} - echo "::set-output name=matrix_os::$( python scripts/gha/print_matrix_configuration.py -w integration_tests ${EXPANDED_MATRIX_PARAM} -k os -o "${{github.event.inputs.operating_systems}}" ${AUTO_DIFF_PARAM} + echo "::set-output name=apis::$( python scripts/gha/print_matrix_configuration.py -c -w integration_tests -k apis -o "${{github.event.inputs.apis}}" ${AUTO_DIFF_PARAM})" + echo "::set-output name=matrix_platform::$( python scripts/gha/print_matrix_configuration.py -w integration_tests ${EXPANDED_MATRIX_PARAM} -k platform -o "${{github.event.inputs.platforms}}" ${AUTO_DIFF_PARAM})" + echo "::set-output name=matrix_os::$( python scripts/gha/print_matrix_configuration.py -w integration_tests ${EXPANDED_MATRIX_PARAM} -k os -o "${{github.event.inputs.operating_systems}}" ${AUTO_DIFF_PARAM})" # If building against a packaged SDK, only use boringssl. if [[ -n "${{ github.event.inputs.test_packaged_sdk }}" ]]; then echo "::warning ::Downloading SDK package from previous run: https://github.com/firebase/firebase-cpp-sdk/actions/runs/${{ github.event.inputs.test_packaged_sdk }}" From 5bc9cf3261675121673dd8a1869b97eb11455fad Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Fri, 19 Mar 2021 14:11:52 -0700 Subject: [PATCH 12/13] Add fetch-depth back in. --- .github/workflows/integration_tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 06d9d130fa..d8ea842321 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -167,6 +167,7 @@ jobs: steps: - uses: actions/checkout@v2 with: + fetch-depth: 0 submodules: false - name: Use expanded matrix if: github.event_name == 'schedule' || github.event.inputs.use_expanded_matrix == '1' || needs.check_trigger.outputs.requested_tests == 'full' From 2723098f258e9acb7a213c499a5eae357ed6b2c6 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Fri, 19 Mar 2021 14:54:42 -0700 Subject: [PATCH 13/13] Add a little more details when tests are still running. --- .github/workflows/integration_tests.yml | 33 ++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index d8ea842321..78cc39aa7e 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -360,6 +360,8 @@ jobs: run: | python scripts/gha/test_lab.py --android_model ${{ needs.prepare_matrix.outputs.android_device }} --android_api ${{ needs.prepare_matrix.outputs.android_api }} --ios_model ${{ needs.prepare_matrix.outputs.ios_device }} --ios_version ${{ needs.prepare_matrix.outputs.ios_version }} --testapp_dir testapps --code_platform cpp --key_file scripts/gha-encrypted/gcs_key_file.json + ### The below allow us to set the failure label and comment early, when the first failure + ### in the matrix occurs. It'll be cleaned up in a subsequent job. - name: add failure label # We can do mark a failure as soon as any one test fails. if: ${{ needs.check_trigger.outputs.should_update_labels && failure() && !cancelled() }} @@ -380,7 +382,7 @@ jobs: if: ${{ needs.check_trigger.outputs.should_update_labels && failure() && !cancelled() }} with: message: | - ### ❌  Integration test FAILED + ### ❌  Integration test FAILED (but still ⏳  in progress) Requested by @${{github.actor}} on commit ${{github.event.pull_request.head.sha}} Last updated: ${{ steps.get-time.outputs.time }} **[View integration test results](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})** @@ -425,6 +427,35 @@ jobs: GITHUB_TOKEN: ${{ github.token }} COMMENT_IDENTIFIER: ${{ env.statusCommentIdentifier }} + add_failure_label: + name: "add-failure-label" + needs: [check_trigger, tests] + runs-on: ubuntu-latest + if: ${{ needs.check_trigger.outputs.should_update_labels && !cancelled() && failure() }} + steps: + - name: add failure label + uses: buildsville/add-remove-label@v1 + with: + token: ${{ github.token }} + label: "${{ env.statusLabelFailed }}" + type: add + - name: get current time for status comment + id: get-time + shell: bash + run: | + echo -n "::set-output name=time::" + TZ=America/Los_Angeles date + - name: add failure status comment + uses: phulsechinmay/rewritable-pr-comment@v0.2.1 + with: + message: | + ### ❌  Integration test FAILED + Requested by @${{github.actor}} on commit ${{github.event.pull_request.head.sha}} + Last updated: ${{ steps.get-time.outputs.time }} + **[View integration test results](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})** + GITHUB_TOKEN: ${{ github.token }} + COMMENT_IDENTIFIER: ${{ env.statusCommentIdentifier }} + remove_in_progress_label: name: "remove-in-progress-label" needs: [check_trigger, tests]