`working-directory` does not work as expected
Hello,
I have python code in two directories, for example: path1 and path2.
I am using this action with working-directory as follows:
name: CI
on:
pull_request:
branches:
- "*"
jobs:
ci:
strategy:
matrix:
path: [path1, path2]
fail-fast: false
defaults:
run:
working-directory: ${{ matrix.path}}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11.10
cache: pip
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Black
uses: psf/black@stable
with:
src: ${{ matrix.path}}
- name: Pyright
uses: jakebailey/pyright-action@v2
with:
working-directory: ${{ matrix.path}}
Expected behavior: pyright runs on the code in the specified directory.
Actual behavior: pyright runs on all python code in the repository.
Can you link to a workflow run which shows the problem?
You're also specifying working-directory in two separate places, not sure what effect that will have. (Will it duplicate?)
Can you link to a workflow run which shows the problem?
Not exactly, since it is a private repository.
You're also specifying working-directory in two separate places, not sure what effect that will have. (Will it duplicate?)
I am specifying it once as the default for all run commands.
The other places are for passing specific parameters to uses steps. The pyright step should use this parameter.
I can confirm that this issue is still present. I used the extra-args parameter as a workaround.