Bug Description
The benchmark.yml workflow fails in CI because the tmp/ directory doesn't exist on the GitHub Actions runner. The step writes --benchmark-json=tmp/benchmark-results.json but never creates the directory first.
Steps to Reproduce
- Have
benchmark.yml workflow trigger on a push or PR
- The "Run benchmarks" step fails with:
pytest: error: argument --benchmark-json: can't open 'tmp/benchmark-results.json': [Errno 2] No such file or directory: 'tmp/benchmark-results.json'
Expected vs Actual Behavior
Expected: Benchmarks run and results are written to tmp/benchmark-results.json
Actual: pytest exits with code 4 because it can't open the output file (parent directory doesn't exist)
Proposed Fix
Add mkdir -p tmp before running pytest in the "Run benchmarks" step:
- name: Run benchmarks
run: |
mkdir -p tmp
uv run pytest tests/benchmarks/ \
--benchmark-enable --benchmark-only \
--benchmark-json=tmp/benchmark-results.json -v
Context
Found during InfraFoundry sync with pyproject-template (endavis/infrafoundry#284). Fixed downstream in endavis/infrafoundry#285.
Bug Description
The
benchmark.ymlworkflow fails in CI because thetmp/directory doesn't exist on the GitHub Actions runner. The step writes--benchmark-json=tmp/benchmark-results.jsonbut never creates the directory first.Steps to Reproduce
benchmark.ymlworkflow trigger on a push or PRExpected vs Actual Behavior
Expected: Benchmarks run and results are written to
tmp/benchmark-results.jsonActual: pytest exits with code 4 because it can't open the output file (parent directory doesn't exist)
Proposed Fix
Add
mkdir -p tmpbefore running pytest in the "Run benchmarks" step:Context
Found during InfraFoundry sync with pyproject-template (endavis/infrafoundry#284). Fixed downstream in endavis/infrafoundry#285.