mirror of
https://github.com/dorny/test-reporter.git
synced 2026-02-01 19:05:23 -08:00
Compare commits
4 Commits
feature/60
...
docs/markd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3a1ec876a9 | ||
|
|
c4b9a11207 | ||
|
|
981f52cdc2 | ||
|
|
016f16f7b8 |
13
.markdownlint.json
Normal file
13
.markdownlint.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"blanks-around-headings": false,
|
||||
"blanks-around-lists": false,
|
||||
"blanks-around-tables": false,
|
||||
"blanks-around-fences": false,
|
||||
"no-bare-urls": false,
|
||||
"line-length": false,
|
||||
"ul-style": false,
|
||||
"no-inline-html": false,
|
||||
"no-multiple-blanks": {
|
||||
"maximum": 3
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@ This [Github Action](https://github.com/features/actions) displays test results
|
||||
✔️ Provides final `conclusion` and counts of `passed`, `failed` and `skipped` tests as output parameters
|
||||
|
||||
**How it looks:**
|
||||
|||||
|
||||
|||||
|
||||
|:--:|:--:|:--:|:--:|
|
||||
|
||||
**Supported languages / frameworks:**
|
||||
|
||||
6
dist/index.js
generated
vendored
6
dist/index.js
generated
vendored
@@ -2439,11 +2439,11 @@ async function downloadArtifact(octokit, artifactId, fileName, token) {
|
||||
};
|
||||
const downloadStream = got_1.default.stream(req.url, { headers });
|
||||
const fileWriterStream = (0, fs_1.createWriteStream)(fileName);
|
||||
downloadStream.on('redirect', (response) => {
|
||||
downloadStream.on('redirect', response => {
|
||||
core.info(`Downloading ${response.headers.location}`);
|
||||
});
|
||||
downloadStream.on('downloadProgress', (progress) => {
|
||||
core.info(`Progress: ${progress.transferred} B`);
|
||||
downloadStream.on('downloadProgress', ({ transferred }) => {
|
||||
core.info(`Progress: ${transferred} B`);
|
||||
});
|
||||
await asyncStream(downloadStream, fileWriterStream);
|
||||
}
|
||||
|
||||
@@ -81,5 +81,10 @@
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20"
|
||||
},
|
||||
"markdownlint-cli2": {
|
||||
"ignores": [
|
||||
"__tests__/**/*"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,17 +2,16 @@ import {createWriteStream} from 'fs'
|
||||
import * as core from '@actions/core'
|
||||
import * as github from '@actions/github'
|
||||
import {GitHub} from '@actions/github/lib/utils'
|
||||
import type {PullRequest, WorkflowRunEvent} from '@octokit/webhooks-types'
|
||||
import {IncomingMessage} from 'http'
|
||||
import type {PullRequest} from '@octokit/webhooks-types'
|
||||
import * as stream from 'stream'
|
||||
import {promisify} from 'util'
|
||||
import got, {Progress} from 'got'
|
||||
import got from 'got'
|
||||
const asyncStream = promisify(stream.pipeline)
|
||||
|
||||
export function getCheckRunContext(): {sha: string; runId: number} {
|
||||
if (github.context.eventName === 'workflow_run') {
|
||||
core.info('Action was triggered by workflow_run: using SHA and RUN_ID from triggering workflow')
|
||||
const event = github.context.payload as WorkflowRunEvent
|
||||
const event = github.context.payload
|
||||
if (!event.workflow_run) {
|
||||
throw new Error("Event of type 'workflow_run' is missing 'workflow_run' field")
|
||||
}
|
||||
@@ -55,11 +54,11 @@ export async function downloadArtifact(
|
||||
const downloadStream = got.stream(req.url, {headers})
|
||||
const fileWriterStream = createWriteStream(fileName)
|
||||
|
||||
downloadStream.on('redirect', (response: IncomingMessage) => {
|
||||
downloadStream.on('redirect', response => {
|
||||
core.info(`Downloading ${response.headers.location}`)
|
||||
})
|
||||
downloadStream.on('downloadProgress', (progress: Progress) => {
|
||||
core.info(`Progress: ${progress.transferred} B`)
|
||||
downloadStream.on('downloadProgress', ({transferred}) => {
|
||||
core.info(`Progress: ${transferred} B`)
|
||||
})
|
||||
|
||||
await asyncStream(downloadStream, fileWriterStream)
|
||||
|
||||
Reference in New Issue
Block a user