mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-16 14:27:10 +01:00
Removed progress percentage as there is no way to deduce content length
This commit is contained in:
parent
1ae86a176d
commit
e356ffe9d0
2 changed files with 2 additions and 4 deletions
|
|
@ -68,7 +68,7 @@ export class ArtifactProvider implements InputProvider {
|
||||||
|
|
||||||
for (const art of artifacts) {
|
for (const art of artifacts) {
|
||||||
const fileName = `${art.name}.zip`
|
const fileName = `${art.name}.zip`
|
||||||
await downloadArtifact(this.octokit, art.id, fileName, art.size_in_bytes, this.token)
|
await downloadArtifact(this.octokit, art.id, fileName, this.token)
|
||||||
core.startGroup(`Reading archive ${fileName}`)
|
core.startGroup(`Reading archive ${fileName}`)
|
||||||
try {
|
try {
|
||||||
const reportName = this.getReportName(art.name)
|
const reportName = this.getReportName(art.name)
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,6 @@ export async function downloadArtifact(
|
||||||
octokit: InstanceType<typeof GitHub>,
|
octokit: InstanceType<typeof GitHub>,
|
||||||
artifactId: number,
|
artifactId: number,
|
||||||
fileName: string,
|
fileName: string,
|
||||||
size: number,
|
|
||||||
token: string
|
token: string
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
core.startGroup(`Downloading artifact ${fileName}`)
|
core.startGroup(`Downloading artifact ${fileName}`)
|
||||||
|
|
@ -74,8 +73,7 @@ export async function downloadArtifact(
|
||||||
|
|
||||||
core.info(`Downloading ${url}`)
|
core.info(`Downloading ${url}`)
|
||||||
downloadStream.on('downloadProgress', ({transferred}) => {
|
downloadStream.on('downloadProgress', ({transferred}) => {
|
||||||
const percentage = Math.round((transferred / size) * 100)
|
core.info(`Progress: ${transferred} B`)
|
||||||
core.info(`Progress: ${transferred}/${size} (${percentage}%)`)
|
|
||||||
})
|
})
|
||||||
await asyncStream(downloadStream, fileWriterStream)
|
await asyncStream(downloadStream, fileWriterStream)
|
||||||
} finally {
|
} finally {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue