-
Notifications
You must be signed in to change notification settings - Fork 4
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 #33 from NOAA-GFDL/conda_env_attempt
Conda env attempt
- Loading branch information
Showing
5 changed files
with
123 additions
and
32 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,74 @@ | ||
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 env var pointing to root of miniconda dir | ||
echo $CONDA/bin >> $GITHUB_PATH | ||
- name: Create fre-workflows environment | ||
run: | | ||
# create environment containing all dependencies | ||
# the env cannot be explicitly activated in github CI/CD | ||
conda env create -f environment.yml --name fre-workflows | ||
# add conda env's executables to github's PATH equiv. | ||
echo $CONDA/envs/fre-workflows/bin >> $GITHUB_PATH | ||
- name: in fre-workflows environment, cylc lint | ||
continue-on-error: true | ||
run: | | ||
# lint .cylc workflow files | ||
cylc lint -v | ||
- name: in fre-workflows environment, data_lineage unittest and pylint | ||
continue-on-error: true | ||
run: | | ||
# unittests for data_lineage | ||
cd data_lineage && \ | ||
python -m unittest discover -s test -v ; \ | ||
pylint -v ; \ | ||
cd - ; | ||
- name: in fre-workflows environment, regrid-xy pytest and pylint | ||
continue-on-error: true | ||
run: | | ||
# pytest unittests for regrid-xy | ||
cd app/regrid-xy && \ | ||
pytest -v -v -rx --cov=regrid_xy ./t ; \ | ||
pylint -v ; \ | ||
cd - ; | ||
- name: in fre-workflows environment, make-timeseries pytest and pylint | ||
continue-on-error: true | ||
run: | | ||
# pytest unittests for make-timeseries | ||
cd app/make-timeseries && \ | ||
pytest -v -v -rx --cov=bin/make-timeseries ./test ; \ | ||
pylint -v ; \ | ||
cd - ; | ||
- name: in fre-workflows environment, remap-pp-components pytest and pylint | ||
continue-on-error: true | ||
run: | | ||
# pytest unittests for remap-pp-components | ||
cd app/remap-pp-components && \ | ||
pytest -v -v -rx --cov=bin/remap-pp-components ./t ; \ | ||
cd - ; | ||
- name: in fre-workflows environment, root directory pytest | ||
continue-on-error: true | ||
run: | | ||
# pytest unittests for other things in this repository | ||
pytest -v -v -rx ./tests |
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
__pycache__ | ||
*~ | ||
tests/test_files_papiex_tooler/*tags |
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,20 @@ | ||
name: fre-workflows | ||
channels: | ||
- defaults | ||
- conda-forge | ||
- noaa-gfdl | ||
dependencies: | ||
- python | ||
- pip | ||
- noaa-gfdl::fre-cli | ||
# - click | ||
# - pyyaml | ||
# - pylint | ||
# - jsonschema | ||
# - noaa-gfdl::fre-nctools | ||
# - conda-forge::cylc-flow>=8.2.0 | ||
# - conda-forge::cylc-rose | ||
# - conda-forge::metomi-rose | ||
# - conda-forge::cylc-uiserver | ||
# - conda-forge::pytest | ||
# - conda-forge::pytest-cov |
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