Fix quotes issue in bc calculation
Tests / Run-Tests (push) Successful in 5s Details
Benchmarks / Run-Benchmarks (push) Failing after 38s Details

main
drunkendog 2023-09-26 01:48:05 +01:00
parent fe59d693f8
commit f7b08754e2
1 changed files with 2 additions and 2 deletions

View File

@ -25,12 +25,12 @@ jobs:
run: | run: |
cd benchmark/ cd benchmark/
BENCHMARK_THROUGHPUT=$(bash benchmark-throughput.sh python3 ../../run-tests.py) BENCHMARK_THROUGHPUT=$(bash benchmark-throughput.sh python3 ../../run-tests.py)
echo "$BENCHMARK_THROUGHPUT" >> $GITHUB_ENV echo "BENCHMARK_THROUGHPUT=$BENCHMARK_THROUGHPUT" >> $GITHUB_ENV
echo "$BENCHMARK_THROUGHPUT" echo "$BENCHMARK_THROUGHPUT"
- name: Update benchmark badge - name: Update benchmark badge
if: needs.pr-check.outputs.number != 'null' && github.ref == 'refs/heads/main' && success() if: needs.pr-check.outputs.number != 'null' && github.ref == 'refs/heads/main' && success()
run: | run: |
curl -f -X 'GET' \ curl -f -X 'GET' \
"https://badgeapi.docker.162536.xyz/set_badge/?repo=marmoset-test-cases&branch=main&action=throughput&new_badge=Throughput-$(bc <<< scale=2; $BENCHMARK_THROUGHPUT / 1024) kB/s-blue" \ "https://badgeapi.docker.162536.xyz/set_badge/?repo=marmoset-test-cases&branch=main&action=throughput&new_badge=Throughput-$(echo "scale=2; $BENCHMARK_THROUGHPUT / 1024" | bc) kB/s-blue" \
-H 'accept: application/json' \ -H 'accept: application/json' \
-H 'X-API-Key: ${{ secrets.BADGE_API_KEY }}' -H 'X-API-Key: ${{ secrets.BADGE_API_KEY }}'