Skip to content

Handling relative paths does not consider the default working-directory #307

@gal432

Description

@gal432

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions