I am relying on modules in my project for which I would like to set append a PYTHONPATH.
Working locally I would do it like this and it works.
However, the same approach for Github Actions throws the error:
ModuleNotFoundError: No module named 'xxxx'
name: my_workflow on: push: branches: - master pull_request: branches: - master jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Set up Python 3.8 uses: actions/setup-python@v1 with: python-version: 3.8 - name: Install dependencies run: | python -m pip install --upgrade pip pip install -r requirements.txt - name: set pythonpath run: | # this does not work. export PYTHONPATH=$PYTHONPATH:/home/runner/work/<repo_name> - name: Test with pytest run: | pip install pytest pytest
I have tried to to set the PYTHONPATH to both
and the above, with no luck.