From 38c5db148fd88e476514db0a0c23b105c9815b34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Collonval?= Date: Thu, 21 Jul 2022 10:55:59 +0200 Subject: [PATCH] Upload memory leak report as artifact (#105) * Test display output action * Switch to customizable artifcat for memory leak report * Remove unused statement * Update expectation --- .github/actions/memory-leak/action.yml | 19 +++++++++++++------ .github/workflows/run-memory-leak.yml | 1 - memory-leaks/tests/file-editor.test.mjs | 2 +- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/actions/memory-leak/action.yml b/.github/actions/memory-leak/action.yml index fe027ff3..84f773fe 100644 --- a/.github/actions/memory-leak/action.yml +++ b/.github/actions/memory-leak/action.yml @@ -9,6 +9,11 @@ inputs: required: true # Optional inputs + artifacts_name: + description: "Uploaded memory leak report" + required: false + default: "memory-leak-report" + type: string samples: description: "Number of samples to compute" required: false @@ -25,10 +30,6 @@ inputs: description: The Git Email to Use for the Commit required: false default: github-actions[bot]@users.noreply.github.com -outputs: - report: - description: "Memory leak report" - value: ${{ steps.reporting.outputs.report }} runs: using: composite @@ -59,9 +60,15 @@ runs: - name: Set job summary if: always() - id: reporting shell: bash run: | sed "s/^[[:space:]]*[[:digit:]])[[:space:]].*$//" /tmp/memory-leaks.log > memory-leak-report.md cat memory-leak-report.md >> $GITHUB_STEP_SUMMARY - echo "::set-output name=report::$(cat memory-leak-report.md)" + + - name: Upload Memory Leak report + if: always() + uses: actions/upload-artifact@v2 + with: + name: ${{ inputs.artifacts_name }} + path: | + memory-leak-report.md diff --git a/.github/workflows/run-memory-leak.yml b/.github/workflows/run-memory-leak.yml index 73afffcd..e51fd7e7 100644 --- a/.github/workflows/run-memory-leak.yml +++ b/.github/workflows/run-memory-leak.yml @@ -99,4 +99,3 @@ jobs: if: always() run: | cat /tmp/jupyterlab_server.log - diff --git a/memory-leaks/tests/file-editor.test.mjs b/memory-leaks/tests/file-editor.test.mjs index ccc54633..2fb6af11 100644 --- a/memory-leaks/tests/file-editor.test.mjs +++ b/memory-leaks/tests/file-editor.test.mjs @@ -3,6 +3,6 @@ import * as scenario from "./file-editor.mjs"; describe("# File editor memory leaks", () => { it("Opening a text file", async () => { - await testScenario(scenario, { expectations: [{ objects: 653, collections: 4 }] }); + await testScenario(scenario, { expectations: [{ objects: 681, collections: 4 }] }); }); });