-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from tdegeus/patch
Adding environment-name option
- Loading branch information
Showing
6 changed files
with
174 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: options | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: null | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [windows-latest, ubuntu-latest, macos-latest] | ||
name: option | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: install mamba | ||
uses: ./ | ||
with: | ||
environment-file: environment.yml | ||
environment-name: myenv | ||
|
||
- name: run python in powershell | ||
shell: powershell | ||
run: | | ||
python -VV | ||
python -c "import numpy" | ||
if: runner.os == 'Windows' | ||
|
||
- name: run python in bash | ||
shell: bash -l {0} | ||
run: | | ||
python -VV | ||
python -c "import numpy" | ||
micromamba --help | ||
if: runner.os != 'Windows' | ||
|
||
- name: test environment name in powershell | ||
shell: powershell | ||
run: | | ||
python -c "import os; env = os.environ['CONDA_PREFIX'].split('\\')[-1]; assert env == 'myenv'" | ||
if: runner.os == 'Windows' | ||
|
||
- name: test environment name in bash | ||
shell: bash -l {0} | ||
run: | | ||
python -c "import os; env = os.environ['CONDA_PREFIX'].split('/')[-1]; assert env == 'myenv'" | ||
if: runner.os != 'Windows' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.