benchmark-action / benchmark-action/github-action-benchmark

Handling relative paths does not consider the default working-directory

Open
#307 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.3k
Forks
184
PR merge metrics
No merged PRs in 30d

Description

I notice that I get an error when reading the file in the following job snippet:

```
rust-bench:
name: Rust bench
timeout-minutes: 20
defaults:
run:
working-directory: ./src/example
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
lfs: true

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Run bench
run: cargo bench --bench my-code | tee results.txt

- name: Store bench with github action
uses: benchmark-action/github-action-benchmark@v1
with:
name: Rust Benchmark
tool: 'cargo'
output-file-path: results.txt
github-token: ${{ github.token }}
auto-push: true
summary-always: true
alert-threshold: '110%'
comment-on-alert: true
fail-on-alert: true
```

From the error, I can see it's ignoring the working-directory parameter.
After I added the `src/example` to the `output-file-path` the action success to read the file

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.