From 00a4fb3f6e465304c6e437666ce6cf8151ae9c7f Mon Sep 17 00:00:00 2001 From: Francois Laithier Date: Thu, 18 Jul 2024 16:56:56 -0700 Subject: [PATCH 1/2] Add log to say which check failed --- .github/workflows/preDeploy.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/preDeploy.yml b/.github/workflows/preDeploy.yml index f09865de0194..bb1cd71c9518 100644 --- a/.github/workflows/preDeploy.yml +++ b/.github/workflows/preDeploy.yml @@ -32,7 +32,9 @@ jobs: - name: Exit failed workflow if: ${{ needs.typecheck.result == 'failure' || needs.lint.result == 'failure' || needs.test.result == 'failure' }} - run: exit 1 + run: | + echo "Checks failed, exiting ~ typecheck: ${{ needs.typecheck.result }}, lint: ${{ needs.lint.result }}, test: ${{ needs.test.result }}" + exit 1 chooseDeployActions: runs-on: ubuntu-latest From 837063af333a19e7dc21f5d2b521d194f0974917 Mon Sep 17 00:00:00 2001 From: Francois Laithier Date: Thu, 18 Jul 2024 17:26:17 -0700 Subject: [PATCH 2/2] Fix workflow tests --- workflow_tests/preDeploy.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/workflow_tests/preDeploy.test.ts b/workflow_tests/preDeploy.test.ts index a69356f84972..1d467b0bd705 100644 --- a/workflow_tests/preDeploy.test.ts +++ b/workflow_tests/preDeploy.test.ts @@ -278,7 +278,7 @@ describe('test workflow preDeploy', () => { utils.createStepAssertion('Announce failed workflow in Slack', true, null, 'CONFIRM_PASSING_BUILD', 'Announcing failed workflow in slack', [ {key: 'SLACK_WEBHOOK', value: '***'}, ]), - utils.createStepAssertion('Exit failed workflow', false, ''), + utils.createStepAssertion('Exit failed workflow', false, 'Checks failed, exiting ~ typecheck: failure, lint: success, test: success'), ]), ); assertions.assertChooseDeployActionsJobExecuted(result, false); @@ -349,7 +349,7 @@ describe('test workflow preDeploy', () => { utils.createStepAssertion('Announce failed workflow in Slack', true, null, 'CONFIRM_PASSING_BUILD', 'Announcing failed workflow in slack', [ {key: 'SLACK_WEBHOOK', value: '***'}, ]), - utils.createStepAssertion('Exit failed workflow', false, ''), + utils.createStepAssertion('Exit failed workflow', false, 'Checks failed, exiting ~ typecheck: success, lint: failure, test: success'), ]), ); assertions.assertChooseDeployActionsJobExecuted(result, false); @@ -420,7 +420,7 @@ describe('test workflow preDeploy', () => { utils.createStepAssertion('Announce failed workflow in Slack', true, null, 'CONFIRM_PASSING_BUILD', 'Announcing failed workflow in slack', [ {key: 'SLACK_WEBHOOK', value: '***'}, ]), - utils.createStepAssertion('Exit failed workflow', false, ''), + utils.createStepAssertion('Exit failed workflow', false, 'Checks failed, exiting ~ typecheck: success, lint: success, test: failure'), ]), ); assertions.assertChooseDeployActionsJobExecuted(result, false);