Skip to content

Commit

Permalink
Update conda-env-create-and-pytest.yml
Browse files Browse the repository at this point in the history
implementing conda env tricks for github ci/cd i figured out here:
NOAA-GFDL/fre-cli#127
  • Loading branch information
ilaflott authored Jul 24, 2024
1 parent 6ee1781 commit 83a93ea
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/conda-env-create-and-pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ jobs:
max-parallel: 5

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4\
- name: Set up Python 3.10
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: '3.10'

Expand All @@ -24,8 +24,10 @@ jobs:
run: |
# create environment catalogbuilder will be installed into
conda env create -f environment.yml --name catalogbuilder
# put conda env binaries in GITHUB_PATH
echo $CONDA/envs/catalogbuilder/bin >> $GITHUB_PATH
# install catalogbuilder
pip install .
$CONDA/envs/catalogbuilder/bin/python -m pip install --prefix $CONDA/envs/catalogbuilder/bin .
- name: Run pytest in catalogbuilder environment
run: |
Expand All @@ -37,14 +39,17 @@ jobs:
- name: Make sample data
run: |
which python
python tests/make_sample_data.py
- name: Generate catalog
run: |
which python
python catalogbuilder/scripts/gen_intake_gfdl.py archive/am5/am5/am5f3b1r0/c96L65_am5f3b1r0_pdclim1850F/gfdl.ncrc5-deploy-prod-openmp/pp gfdl_autotest
- name: Generate catalog with yaml
run: |
which python
python catalogbuilder/scripts/gen_intake_gfdl.py --config tests/test_config.yaml
- name: upload-artifacts
Expand All @@ -66,5 +71,6 @@ jobs:
- name: Test for completeness
run: |
which python
python catalogbuilder/scripts/test_catalog.py -tf gfdl_autotest.json catalogbuilder/cats/gfdl_template.json
python catalogbuilder/scripts/test_catalog.py -tf catalogbuilder/cats/gfdl_autotest_from_yaml.json

0 comments on commit 83a93ea

Please sign in to comment.