Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload memory leak report as artifact #105

Merged
merged 4 commits into from
Jul 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }] });
});
});