0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00

bench workflow - pipe stderr (#5543)

This commit is contained in:
Matthew Phillips 2022-12-06 09:32:45 -05:00 committed by GitHub
parent fabd9124bd
commit 7809c5c04b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -48,9 +48,10 @@ jobs:
- name: Run benchmark - name: Run benchmark
id: benchmark-pr id: benchmark-pr
run: | run: |
pnpm run --silent benchmark > ./bench-result.md pnpm run --silent benchmark 1&> ./bench-result.md
result=$(awk '/requests in/' ./bench-result.md) result=$(awk '/requests in/' ./bench-result.md)
echo "::set-output name=BENCH_RESULT${{matrix.node-version}}::$result" echo "::set-output name=BENCH_RESULT${{matrix.node-version}}::$result"
echo "$result"
# main benchmark # main benchmark
- uses: actions/checkout@v3 - uses: actions/checkout@v3
@ -68,9 +69,10 @@ jobs:
- name: Run benchmark - name: Run benchmark
id: benchmark-main id: benchmark-main
run: | run: |
pnpm run --silent benchmark > ./bench-result.md pnpm run --silent benchmark 1&> ./bench-result.md
result=$(awk '/requests in/' ./bench-result.md) result=$(awk '/requests in/' ./bench-result.md)
echo "::set-output name=BENCH_RESULT${{matrix.node-version}}::$result" echo "::set-output name=BENCH_RESULT${{matrix.node-version}}::$result"
echo "$result"
output-benchmark: output-benchmark:
if: ${{ github.repository_owner == 'withastro' && github.event.issue.pull_request && startsWith(github.event.comment.body, '!bench') }} if: ${{ github.repository_owner == 'withastro' && github.event.issue.pull_request && startsWith(github.event.comment.body, '!bench') }}