changing the cwd
See original GitHub issueI’m trying to use setup-miniconda
with my python package setup. The default github workflow for python package ci was working:
name: traitar3
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Test with pytest
run: |
pytest -s --script-launch-mode=subprocess
…and here’s my yaml when incorporating setup-miniconda
:
name: traitar3
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
name: build (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
steps:
- uses: goanpeca/setup-miniconda@v1
with:
miniconda-version: 'latest'
auto-update-conda: true
python-version: ${{ matrix.python-version }}
channels: conda-forge,bioconda
activate-environment: traitar3
- name: conda env create
shell: bash -l {0}
run: |
conda info -a
conda install python=${{ matrix.python-version }} bioconda::hmmer scipy pandas numpy matplotlib
- name: package install
run: |
python -m pip install --upgrade pip
pip install pytest pytest-dependency pytest-console-scripts
python setup.py install
- name: Test with pytest
run: |
pytest -s --script-launch-mode=subprocess
The setup-miniconda
version always throws the error: python: can't open file 'setup.py': [Errno 2] No such file or directory
. I’m guessing that either uses: goanpeca/setup-miniconda@v1
or shell: bash -l {0}
is changing the working directory, so then setup.py
cannot be found. I’ve been trying to debug this for a while with a number of approaches and haven’t found a solution. Any help would be appreciated.
It would be helpful to include python package setup in one of the setup-miniconda
examples.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
How to Get and Change the Current Working Directory in Python
To change the current working directory in Python, use the chdir() method. os.getcwd(path)
Read more >Get and change the current working directory in Python
You can change the current directory like the Unix command cd . Both chdir and cd stand for "change directory". os.chdir ...
Read more >Changing the Current Directory - Win32 apps - Microsoft Learn
An application can change the current directory by calling the SetCurrentDirectory function.
Read more >CWD—Changing the Working Directory - TCP/IP ... - Unisys
CWD —Changing the Working Directory ; Usercode and family components are specified in the command. Changes the usercode and family to the specified...
Read more >Change Current Directory (CHGCURDIR) - IBM
The Change Current Directory (CHGCURDIR) command changes a specified directory to the current working directory. The current directory can be a directory, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
See: https://github.com/actions/checkout
Glad you got it working 👍🏼