From 7d04196f06df6954c1fcaddd1dd4326304427c2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Chrab=C4=85szczewski?= Date: Tue, 2 Jan 2024 10:32:48 +0100 Subject: [PATCH 1/4] fix: read output from fs --- .../validateReassureOutput/validateReassureOutput.js | 3 ++- .github/workflows/reassurePerformanceTests.yml | 7 ------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/actions/javascript/validateReassureOutput/validateReassureOutput.js b/.github/actions/javascript/validateReassureOutput/validateReassureOutput.js index da81d88c9885..214dc9e8b6d4 100644 --- a/.github/actions/javascript/validateReassureOutput/validateReassureOutput.js +++ b/.github/actions/javascript/validateReassureOutput/validateReassureOutput.js @@ -1,7 +1,8 @@ const core = require('@actions/core'); +const fs = require('fs'); const run = () => { - const regressionOutput = JSON.parse(core.getInput('REGRESSION_OUTPUT', {required: true})); + const regressionOutput = JSON.parse(fs.readFileSync('.reassure/output.json', 'utf8')); const countDeviation = core.getInput('COUNT_DEVIATION', {required: true}); const durationDeviation = core.getInput('DURATION_DEVIATION_PERCENTAGE', {required: true}); diff --git a/.github/workflows/reassurePerformanceTests.yml b/.github/workflows/reassurePerformanceTests.yml index c49530c46faa..116f178868c1 100644 --- a/.github/workflows/reassurePerformanceTests.yml +++ b/.github/workflows/reassurePerformanceTests.yml @@ -36,17 +36,10 @@ jobs: npm install --force npx reassure --branch - - name: Read output.json - id: reassure - uses: juliangruber/read-file-action@v1 - with: - path: .reassure/output.json - - name: Validate output.json id: validateReassureOutput uses: ./.github/actions/javascript/validateReassureOutput with: DURATION_DEVIATION_PERCENTAGE: 20 COUNT_DEVIATION: 0 - REGRESSION_OUTPUT: ${{ steps.reassure.outputs.content }} From 38fbed03b8e27f85681c479ed5b9759a1270f800 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Chrab=C4=85szczewski?= Date: Tue, 2 Jan 2024 10:50:27 +0100 Subject: [PATCH 2/4] fix: rebuild actions --- .github/actions/javascript/reviewerChecklist/index.js | 5 +---- .../actions/javascript/validateReassureOutput/index.js | 8 +++----- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/actions/javascript/reviewerChecklist/index.js b/.github/actions/javascript/reviewerChecklist/index.js index abebb67e8173..9f56aa85b3c8 100644 --- a/.github/actions/javascript/reviewerChecklist/index.js +++ b/.github/actions/javascript/reviewerChecklist/index.js @@ -1,6 +1,3 @@ -/** - * NOTE: This is a compiled file. DO NOT directly edit this file. - */ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ @@ -19308,4 +19305,4 @@ getNumberOfItemsFromReviewerChecklist() module.exports = __webpack_exports__; /******/ })() -; +; \ No newline at end of file diff --git a/.github/actions/javascript/validateReassureOutput/index.js b/.github/actions/javascript/validateReassureOutput/index.js index 6cc59af1de48..49aca8bfc5c0 100644 --- a/.github/actions/javascript/validateReassureOutput/index.js +++ b/.github/actions/javascript/validateReassureOutput/index.js @@ -1,6 +1,3 @@ -/** - * NOTE: This is a compiled file. DO NOT directly edit this file. - */ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ @@ -8,9 +5,10 @@ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { const core = __nccwpck_require__(186); +const fs = __nccwpck_require__(147); const run = () => { - const regressionOutput = JSON.parse(core.getInput('REGRESSION_OUTPUT', {required: true})); + const regressionOutput = JSON.parse(fs.readFileSync('.reassure/output.json', 'utf8')); const countDeviation = core.getInput('COUNT_DEVIATION', {required: true}); const durationDeviation = core.getInput('DURATION_DEVIATION_PERCENTAGE', {required: true}); @@ -2878,4 +2876,4 @@ module.exports = require("util"); /******/ module.exports = __webpack_exports__; /******/ /******/ })() -; +; \ No newline at end of file From 52ae24a94ee104c50f5a7a4fae730a98b0825f3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Chrab=C4=85szczewski?= Date: Tue, 2 Jan 2024 10:57:43 +0100 Subject: [PATCH 3/4] fix: gh actions build --- .github/actions/javascript/reviewerChecklist/index.js | 5 ++++- .github/actions/javascript/validateReassureOutput/index.js | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/actions/javascript/reviewerChecklist/index.js b/.github/actions/javascript/reviewerChecklist/index.js index 9f56aa85b3c8..abebb67e8173 100644 --- a/.github/actions/javascript/reviewerChecklist/index.js +++ b/.github/actions/javascript/reviewerChecklist/index.js @@ -1,3 +1,6 @@ +/** + * NOTE: This is a compiled file. DO NOT directly edit this file. + */ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ @@ -19305,4 +19308,4 @@ getNumberOfItemsFromReviewerChecklist() module.exports = __webpack_exports__; /******/ })() -; \ No newline at end of file +; diff --git a/.github/actions/javascript/validateReassureOutput/index.js b/.github/actions/javascript/validateReassureOutput/index.js index 49aca8bfc5c0..e70c379697cd 100644 --- a/.github/actions/javascript/validateReassureOutput/index.js +++ b/.github/actions/javascript/validateReassureOutput/index.js @@ -1,3 +1,6 @@ +/** + * NOTE: This is a compiled file. DO NOT directly edit this file. + */ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ @@ -2876,4 +2879,4 @@ module.exports = require("util"); /******/ module.exports = __webpack_exports__; /******/ /******/ })() -; \ No newline at end of file +; From 1d80a240321e61d64a40cce879ea213f9caf9c41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Chrab=C4=85szczewski?= Date: Tue, 2 Jan 2024 11:04:48 +0100 Subject: [PATCH 4/4] fix: remove REGRESSION_OUTPUT from validateReassureOutput def --- .github/actions/javascript/validateReassureOutput/action.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/actions/javascript/validateReassureOutput/action.yml b/.github/actions/javascript/validateReassureOutput/action.yml index 4fd53e838fb5..b3b18c244a8f 100644 --- a/.github/actions/javascript/validateReassureOutput/action.yml +++ b/.github/actions/javascript/validateReassureOutput/action.yml @@ -7,9 +7,6 @@ inputs: COUNT_DEVIATION: description: Allowable deviation for the mean count in regression test results. required: true - REGRESSION_OUTPUT: - description: Refers to the results obtained from regression tests `.reassure/output.json`. - required: true runs: using: 'node20' main: './index.js'