Skip to content

Commit

Permalink
Updates to README and info logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Dorner committed Feb 1, 2021
1 parent efb99ae commit 9c4a2c5
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 78 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ Or with (undocumented) CLI argument:


According to documentation `dart_test.yaml` should be at the root of the package, next to the package's pubspec.
It works in dart projects but the file is ignored by flutter. With flutter it works when `dart_test.yaml` is placed inside your `test` folder.
On current `stable` and `beta` channels it doesn't work and you have to put `dart_test.yaml` inside your `test` folder.
On `dev` channel it's already fixed.

For more information see:
- [test package](https://pub.dev/packages/test)
Expand Down
74 changes: 6 additions & 68 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,12 @@ async function main(): Promise<void> {
}

if (workDirInput) {
core.info(`Changing directory to ${workDirInput}`)
core.info(`Changing directory to '${workDirInput}'`)
process.chdir(workDirInput)
}

const workDir = normalizeDirPath(process.cwd(), true)
core.info(`Using working-directory '${workDir}'`)
const octokit = github.getOctokit(token)
const sha = getCheckRunSha()

Expand All @@ -81,7 +82,7 @@ async function main(): Promise<void> {

const results: TestRunResult[] = []
for (const file of files) {
core.info(`Processing test report ${file}`)
core.info(`Processing test report '${file}'`)
const content = await fs.promises.readFile(file, {encoding: 'utf8'})
const tr = await parser.parse(file, content)
results.push(tr)
Expand Down
2 changes: 0 additions & 2 deletions src/parsers/dart-json/dart-json-parser.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as core from '@actions/core'
import {ParseOptions, TestParser} from '../../test-parser'

import {normalizeFilePath} from '../../utils/file-utils'
Expand Down Expand Up @@ -78,7 +77,6 @@ export class DartJsonParser implements TestParser {
}

private getTestRun(path: string, content: string): TestRun {
core.info(`Parsing content of '${path}'`)
const lines = content.split(/\n\r?/g)
const events = lines
.map((str, i) => {
Expand Down
2 changes: 0 additions & 2 deletions src/parsers/dotnet-trx/dotnet-trx-parser.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as core from '@actions/core'
import {parseStringPromise} from 'xml2js'

import {ErrorInfo, Outcome, TestMethod, TrxReport} from './dotnet-trx-types'
Expand Down Expand Up @@ -52,7 +51,6 @@ export class DotnetTrxParser implements TestParser {
}

private async getTrxReport(path: string, content: string): Promise<TrxReport> {
core.info(`Parsing content of '${path}'`)
try {
return (await parseStringPromise(content)) as TrxReport
} catch (e) {
Expand Down
2 changes: 0 additions & 2 deletions src/parsers/jest-junit/jest-junit-parser.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as core from '@actions/core'
import {ParseOptions, TestParser} from '../../test-parser'
import {parseStringPromise} from 'xml2js'

Expand All @@ -23,7 +22,6 @@ export class JestJunitParser implements TestParser {
}

private async getJunitReport(path: string, content: string): Promise<JunitReport> {
core.info(`Parsing content of '${path}'`)
try {
return (await parseStringPromise(content)) as JunitReport
} catch (e) {
Expand Down

0 comments on commit 9c4a2c5

Please sign in to comment.