Skip to content

Commit

Permalink
ci: move to new set-env way (#496)
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkdev98 committed Nov 18, 2020
1 parent 4e64a2a commit d565c09
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/pr-checks.yml
Expand Up @@ -38,16 +38,11 @@ jobs:
${{ runner.os }}-yarn-
- name: Run benchmarks
# New line stripping from: https://github.community/t/set-output-truncates-multiline-strings/16852/5
run: |
yarn install
yarn lbu gen
yarn lbu bench
RESULT="$(cat ./benchmark_output.txt)"
RESULT="${RESULT//'%'/'%25'}"
RESULT="${RESULT//$'\n'/'%0A'}"
RESULT="${RESULT//$'\r'/'%0D'}"
echo "::set-env name=BENCH_RESULT::$RESULT"
echo -e "BENCH_RESULT<<EOF\n$(cat ./benchmark_output.txt)\nEOF" | tee -a $GITHUB_ENV
- name: Comment bench result
uses: mshick/add-pr-comment@v1
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/benchmarking/printer.js
Expand Up @@ -46,7 +46,7 @@ export function printBenchResults() {
// something
writeFileSync(
pathJoin(process.cwd(), "benchmark_output.txt"),
result.join("\n"),
result.join("\n").trim(),
"utf8",
);
}
Expand Down

0 comments on commit d565c09

Please sign in to comment.