From 0207bbff970d32e137e1c24e4bff5552e055366d Mon Sep 17 00:00:00 2001 From: Rodel Calasagsag Date: Fri, 1 Sep 2023 11:35:37 +0800 Subject: [PATCH] Handle skipped plugin tests --- .../scripts/construct-slack-payload.js | 22 +++++++++++++++++-- .github/workflows/smoke-test-daily.yml | 1 + 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/actions/tests/slack-summary-daily/scripts/construct-slack-payload.js b/.github/actions/tests/slack-summary-daily/scripts/construct-slack-payload.js index d747d90768b..ef88808d92b 100644 --- a/.github/actions/tests/slack-summary-daily/scripts/construct-slack-payload.js +++ b/.github/actions/tests/slack-summary-daily/scripts/construct-slack-payload.js @@ -127,10 +127,28 @@ module.exports = async ( { context, core, github } ) => { return blocks; }; + const create_blockGroups_plugins = () => { + const blocks_pluginTestsNotRun = [ + { + type: 'section', + text: { + type: 'mrkdwn', + text: ':warning: *Plugin tests were not run!*', + }, + }, + { + type: 'divider', + }, + ]; + + return PLUGINS_BLOCKS_PATH + ? readContextBlocksFromJsonFiles( PLUGINS_BLOCKS_PATH ) + : blocks_pluginTestsNotRun; + }; + const blockGroup_header = await create_blockGroup_header(); const blockGroup_nightlySite = create_blockGroup_nightlySite(); - const blockGroups_plugins = - readContextBlocksFromJsonFiles( PLUGINS_BLOCKS_PATH ); + const blockGroups_plugins = create_blockGroups_plugins(); const blocks_all = [ ...blockGroup_header, ...blockGroup_nightlySite, diff --git a/.github/workflows/smoke-test-daily.yml b/.github/workflows/smoke-test-daily.yml index a8fae464492..72accab4e1d 100644 --- a/.github/workflows/smoke-test-daily.yml +++ b/.github/workflows/smoke-test-daily.yml @@ -357,6 +357,7 @@ jobs: - uses: actions/checkout@v3 - name: Download Slack blocks from plugin tests + if: ! contains(fromJSON('["skipped", "cancelled"]'), needs.test-plugins.result) id: download-plugin-blocks uses: actions/download-artifact@v3 with: