benchmark-action / github-action-benchmark

GitHub Action for continuous benchmarking to keep performance
https://benchmark-action.github.io/github-action-benchmark/dev/bench/
MIT License
1.03k stars 153 forks source link

github action continue after error in `foo | tee output.txt` #184

Open LuckyTurtleDev opened 1 year ago

LuckyTurtleDev commented 1 year ago

if you use run cargo +nightly bench | tee output.txt exit code 0 will be returned if cargo exit with an error, because tee has exit successful. So github action continue after the error and does not fail.

LuckyTurtleDev commented 1 year ago

The readme/example should suggest

- name: Run benchmark
        run: |
          set -eo pipefail
          cargo +nightly bench | tee output.txt

instead of

- name: Run benchmark
        run:  cargo +nightly bench | tee output.txt

Same for the other languages.