Skip to content

Commit

Permalink
ONE LAST IDEA i swear.
Browse files Browse the repository at this point in the history
we 1) ask github CI/CD to setup a python3.10
we 2) ask conda to create an env with a python, but the package is NOT installed.

i tried "pip install .", but that didnt work... because it used the first python, i imagine.

now i will try calling the explicit pip of the CONDA python to install the package, before calling the test.
  • Loading branch information
ilaflott committed Jul 22, 2024
1 parent be073ac commit e9766e5
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/create-gfdl-catalog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,29 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: '3.10'

- 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: Install dependencies
run: |
conda env create -f environment.yml --name catalogbuilder
pip install .
- name: Make sample data
run: python tests/make_sample_data.py

- name: Generate catalog
run: |
pip install .
$CONDA/envs/catalogbuilder/bin/python -m pip install .
$CONDA/envs/catalogbuilder/bin/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: |
pip install .
$CONDA/envs/catalogbuilder/bin/python catalogbuilder/scripts/gen_intake_gfdl.py --config tests/test_config.yaml
- name: upload-artifacts1
uses: actions/upload-artifact@v4
with:
Expand All @@ -45,12 +50,15 @@ jobs:
gfdl_autotest.json
cats/gfdl_autotest_from_yaml.csv
cats/gfdl_autotest_from_yaml.json
- name: Download all workflow run artifacts
uses: actions/download-artifact@v4

- name: Test with pytest
run: |
conda install pytest
$CONDA/envs/catalogbuilder/bin/pytest -v --runxfail
- name: Test for completeness
run: |
pip install .
Expand Down

0 comments on commit e9766e5

Please sign in to comment.