Skip to content

Commit

Permalink
Update conda-env-create-and-pytest.yml
Browse files Browse the repository at this point in the history
that later pytest call isnt redundant, it uses the downloaded artifacts from earlier in the workflow.

also, pretty sure the `python` call points to the right one, even if `pytest` doesn't without the path to the executable in the conda env.
  • Loading branch information
ilaflott authored Jul 23, 2024
1 parent 8692ee6 commit 42d1c44
Showing 1 changed file with 10 additions and 18 deletions.
28 changes: 10 additions & 18 deletions .github/workflows/conda-env-create-and-pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,16 @@ jobs:
- name: Make sample data
run: |
# python tests/make_sample_data.py
$CONDA/envs/catalogbuilder/bin/python tests/make_sample_data.py
python tests/make_sample_data.py
- name: Generate catalog
run: |
$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
# python catalogbuilder/scripts/gen_intake_gfdl.py archive/am5/am5/am5f3b1r0/c96L65_am5f3b1r0_pdclim1850F/gfdl.ncrc5-deploy-prod-openmp/pp gfdl_autotest
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: |
$CONDA/envs/catalogbuilder/bin/python catalogbuilder/scripts/gen_intake_gfdl.py --config tests/test_config.yaml
# python catalogbuilder/scripts/gen_intake_gfdl.py --config tests/test_config.yaml
python catalogbuilder/scripts/gen_intake_gfdl.py --config tests/test_config.yaml
- name: upload-artifacts
uses: actions/upload-artifact@v4
with:
Expand All @@ -63,16 +60,11 @@ jobs:
- name: Download all workflow run artifacts
uses: actions/download-artifact@v4

# seems redundant?
# - name: Test with pytest
# run: |
# conda install pytest
# # $CONDA/envs/catalogbuilder/bin/pytest -v --runxfail
# pytest -v --runxfail
- name: Run pytest with downloaded artifacts
run: |
$CONDA/envs/catalogbuilder/bin/pytest -v --runxfail
- name: Test for completeness
run: |
$CONDA/envs/catalogbuilder/bin/python catalogbuilder/scripts/test_catalog.py -tf gfdl_autotest.json catalogbuilder/cats/gfdl_template.json
$CONDA/envs/catalogbuilder/bin/python catalogbuilder/scripts/test_catalog.py -tf catalogbuilder/cats/gfdl_autotest_from_yaml.json
# 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
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 42d1c44

Please sign in to comment.