mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-16 14:27:10 +01:00
Merge branch 'main' into mocha-empty-test-suite
This commit is contained in:
commit
48bf7af48b
21 changed files with 3328 additions and 3280 deletions
|
|
@ -1,21 +0,0 @@
|
|||
import {exec as execImpl, ExecOptions} from '@actions/exec'
|
||||
|
||||
// Wraps original exec() function
|
||||
// Returns exit code and whole stdout/stderr
|
||||
export default async function exec(commandLine: string, args?: string[], options?: ExecOptions): Promise<ExecResult> {
|
||||
options = options || {}
|
||||
let stdout = ''
|
||||
let stderr = ''
|
||||
options.listeners = {
|
||||
stdout: (data: Buffer) => (stdout += data.toString()),
|
||||
stderr: (data: Buffer) => (stderr += data.toString())
|
||||
}
|
||||
const code = await execImpl(commandLine, args, options)
|
||||
return {code, stdout, stderr}
|
||||
}
|
||||
|
||||
export interface ExecResult {
|
||||
code: number
|
||||
stdout: string
|
||||
stderr: string
|
||||
}
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
import * as core from '@actions/core'
|
||||
import exec from './exec'
|
||||
import {getExecOutput} from '@actions/exec'
|
||||
|
||||
export async function listFiles(): Promise<string[]> {
|
||||
core.startGroup('Listing all files tracked by git')
|
||||
let output = ''
|
||||
try {
|
||||
output = (await exec('git', ['ls-files', '-z'])).stdout
|
||||
output = (await getExecOutput('git', ['ls-files', '-z'])).stdout
|
||||
} finally {
|
||||
fixStdOutNullTermination()
|
||||
core.endGroup()
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ export enum Align {
|
|||
}
|
||||
|
||||
export const Icon = {
|
||||
skip: '✖️', // ':heavy_multiplication_x:'
|
||||
success: '✔️', // ':heavy_check_mark:'
|
||||
skip: '⚪', // ':white_circle:'
|
||||
success: '✅', // ':white_check_mark:'
|
||||
fail: '❌' // ':x:'
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue