Skip to content

Commit

Permalink
Fixing test
Browse files Browse the repository at this point in the history
  • Loading branch information
tdegeus committed Feb 24, 2021
1 parent 3aa33d9 commit 79720b3
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions .github/workflows/options.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,26 +37,14 @@ jobs:
micromamba --help
if: runner.os != 'Windows'

- name: debug environment name in powershell
shell: powershell
run: |
python -c "import subprocess; ret = subprocess.check_output(['conda', 'info']).decode('utf-8'); print(ret.split('active environment : ')[1].split('\n')[0])"
if: runner.os == 'Windows'

- name: debug environment name in bash
shell: bash -l {0}
run: |
python -c "import subprocess; ret = subprocess.check_output(['conda', 'info']).decode('utf-8'); print(ret.split('active environment : ')[1].split('\n')[0])"
if: runner.os != 'Windows'

- name: test environment name in powershell
shell: powershell
run: |
python -c "import subprocess; ret = subprocess.check_output(['conda', 'info']).decode('utf-8'); assert ret.split('active environment : ')[1].split('\n')[0] == 'myenv'"
python -c "import subprocess; ret = subprocess.check_output(['conda', 'info']).decode('utf-8'); assert ret.split('active environment : ')[1].split('/')[-1].split('\n')[0] == 'myenv'"
if: runner.os == 'Windows'

- name: test environment name in bash
shell: bash -l {0}
run: |
python -c "import subprocess; ret = subprocess.check_output(['conda', 'info']).decode('utf-8'); assert ret.split('active environment : ')[1].split('\n')[0] == 'myenv'"
python -c "import subprocess; ret = subprocess.check_output(['conda', 'info']).decode('utf-8'); assert ret.split('active environment : ')[1].split('/')[-1].split('\n')[0] == 'myenv'"
if: runner.os != 'Windows'

0 comments on commit 79720b3

Please sign in to comment.