1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-07-25 16:45:00 +02:00

refacotr(gh): refactor

This commit is contained in:
syuilo
2026-07-16 22:27:32 +09:00
parent 5d0ecf976d
commit ab21fc725b
4 changed files with 10 additions and 12 deletions

View File

@@ -242,7 +242,7 @@ async function genReport(label: 'base' | 'head', repoDir: string, outputPath: st
try {
server = util.startServer(label, repoDir);
await util.waitForServer(baseUrl, server!);
await util.waitForServer(baseUrl, server);
await rm(heapSnapshotWorkDirs[label], { recursive: true, force: true });
await mkdir(heapSnapshotWorkDirs[label], { recursive: true });
@@ -261,9 +261,7 @@ async function genReport(label: 'base' | 'head', repoDir: string, outputPath: st
await writeFile(outputPath, JSON.stringify(report, null, '\t'));
process.stderr.write(`[${label}] Wrote browser metrics report to ${outputPath}\n`);
if (heapSnapshotSavePath != null) {
await saveRepresentativeHeapSnapshot(label, report, heapSnapshotSavePath);
}
await saveRepresentativeHeapSnapshot(label, report, heapSnapshotSavePath);
} finally {
if (server != null) await util.stopServer(server);
}

View File

@@ -35,7 +35,7 @@ jobs:
run: echo "pr-number=$(cat artifacts/pr_number)" >> "$GITHUB_OUTPUT"
- name: Find heap snapshot artifacts
id: find-heap-snapshot-artifacts
uses: actions/github-script@v8
uses: actions/github-script@v9
with:
script: |
const { owner, repo } = context.repo;

View File

@@ -60,7 +60,7 @@ jobs:
steps:
- name: Checkout base
uses: actions/checkout@v6.0.2
uses: actions/checkout@v6.0.3
with:
persist-credentials: false
repository: ${{ github.event.pull_request.base.repo.full_name }}
@@ -69,7 +69,7 @@ jobs:
submodules: true
- name: Checkout pull request
uses: actions/checkout@v6.0.2
uses: actions/checkout@v6.0.3
with:
persist-credentials: false
repository: ${{ github.event.pull_request.head.repo.full_name }}
@@ -78,7 +78,7 @@ jobs:
submodules: true
- name: Setup pnpm
uses: pnpm/action-setup@v6.0.3
uses: pnpm/action-setup@v6.0.9
with:
package_json_file: after/package.json
@@ -133,7 +133,7 @@ jobs:
id: upload-browser-base-heap-snapshot
uses: actions/upload-artifact@v7
with:
path: base-heap-snapshot.heapsnapshot
path: ${{ runner.temp }}/frontend-browser-diagnostics/base-heap-snapshot.heapsnapshot
archive: false
if-no-files-found: error
retention-days: 7
@@ -142,7 +142,7 @@ jobs:
id: upload-browser-head-heap-snapshot
uses: actions/upload-artifact@v7
with:
path: head-heap-snapshot.heapsnapshot
path: ${{ runner.temp }}/frontend-browser-diagnostics/head-heap-snapshot.heapsnapshot
archive: false
if-no-files-found: error
retention-days: 7

View File

@@ -123,12 +123,12 @@ jobs:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v6.0.2
- uses: actions/checkout@v6.0.3
with:
fetch-depth: 0
submodules: true
- name: Setup pnpm
uses: pnpm/action-setup@v6.0.3
uses: pnpm/action-setup@v6.0.9
- uses: actions/setup-node@v6.4.0
with:
node-version-file: '.node-version'