Skip to content

Commit

Permalink
Upload memory leak report as artifact (#105)
Browse files Browse the repository at this point in the history
* Test display output action

* Switch to customizable artifcat for memory leak report

* Remove unused statement

* Update expectation
  • Loading branch information
fcollonval committed Jul 21, 2022
1 parent bb1d6b9 commit 38c5db1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
19 changes: 13 additions & 6 deletions .github/actions/memory-leak/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
1 change: 0 additions & 1 deletion .github/workflows/run-memory-leak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,3 @@ jobs:
if: always()
run: |
cat /tmp/jupyterlab_server.log
2 changes: 1 addition & 1 deletion memory-leaks/tests/file-editor.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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 }] });
});
});

0 comments on commit 38c5db1

Please sign in to comment.