-
Notifications
You must be signed in to change notification settings - Fork 11
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 #127 from NOAA-GFDL/improveCIworkflow
Improve ci workflows
- Loading branch information
Showing
3 changed files
with
46 additions
and
2 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,38 @@ | ||
name: create_test_conda_env | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build-linux: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '>=3.9' | ||
|
||
- name: Add conda to system path | ||
run: | | ||
# $CONDA is an environment variable pointing to the root of the miniconda directory | ||
echo $CONDA/bin >> $GITHUB_PATH | ||
- name: Create fre-cli environment | ||
run: | | ||
# create environment fre-cli will be installed into | ||
conda env create -f environment.yml --name fre-cli | ||
# try to make sure the right things are in GITHUB_PATH | ||
echo $CONDA/envs/fre-cli/bin >> $GITHUB_PATH | ||
# install fre-cli w pip | ||
$CONDA/envs/fre-cli/bin/python -m pip install --prefix $CONDA/envs/fre-cli . | ||
- name: Run pytest in fre-cli environment | ||
run: | | ||
# try to make sure the right things are in GITHUB_PATH | ||
echo $CONDA/envs/fre-cli/bin >> $GITHUB_PATH | ||
which python | ||
python --version | ||
$CONDA/envs/fre-cli/bin/python --version | ||
# run pytest | ||
$CONDA/envs/fre-cli/bin/pytest |
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