Skip to content
This repository was archived by the owner on Aug 14, 2020. It is now read-only.

Support several test report paths #3

Merged
merged 3 commits into from
Apr 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,7 @@ The Scope Import tool is compatible with the following test reports:
uses: undefinedlabs/scope-import-action@v1
with:
dsn: ${{ secrets.SCOPE_DSN }}
path: path/to/test-reports
path: |
path/to/test-reports01
path/to/test-reports02
```
4 changes: 2 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1686,7 +1686,7 @@ function run() {
try {
let dsn = core.getInput("dsn", { required: true });
yield core.exportVariable("SCOPE_DSN", dsn);
let pathVar = core.getInput("path", { required: true });
const pathVar = core.getInput("path", { required: true }).replace(/[\r\n]/gm, " ");
const platform = IS_WINDOWS ? "windows" : IS_MACOS ? "darwin" : "linux";
let scopeImportToolPath;
scopeImportToolPath = yield tc.downloadTool("https://home.undefinedlabs.com/download/scope-import/" +
Expand All @@ -1699,7 +1699,7 @@ function run() {
else {
yield exec.exec("chmod +x " + scopeImportToolPath);
}
yield exec.exec(scopeImportToolPath + " --path " + pathVar);
yield exec.exec(scopeImportToolPath + " " + pathVar);
}
catch (error) {
core.setFailed(error.message);
Expand Down
4 changes: 2 additions & 2 deletions src/scope-import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ async function run() {
let dsn = core.getInput("dsn", { required: true });
await core.exportVariable("SCOPE_DSN", dsn);

let pathVar = core.getInput("path", { required: true });
const pathVar = core.getInput("path", { required: true }).replace(/[\r\n]/gm, " ");
const platform = IS_WINDOWS ? "windows" : IS_MACOS ? "darwin" : "linux";

let scopeImportToolPath;
Expand All @@ -27,7 +27,7 @@ async function run() {
} else {
await exec.exec("chmod +x " + scopeImportToolPath);
}
await exec.exec(scopeImportToolPath + " --path " + pathVar);
await exec.exec(scopeImportToolPath + " " + pathVar);
} catch (error) {
core.setFailed(error.message);
}
Expand Down