NCAR / ccpp-framework

Common Community Physics Package (CCPP)
http://www.dtcenter.org/community-code/common-community-physics-package-ccpp/
Other
26 stars 64 forks source link

CI tests for prebuild not running correctly on main branch #532

Closed mkavulich closed 9 months ago

mkavulich commented 9 months ago

Description

When looking at the CCPP framework repository in GitHub, one is met with an ugly ❌ besides the latest commits. This is due to an old set of CI tests in .github/workflows/python.yaml, which is failing for unclear reasons but appears to be due to the movement of the tests directory to test_prebuild in #515. This was not caught at the time because this old test is set to only run on the NCAR/ccpp-framework repository, so PRs from forks will not invoke this test.

In addition, while #515 did attempt to implement the old prebuild tests in test_metadata_parser.py and test_mkstatic.py, it appears to have done so incorrectly, calling them with python3 (a no-op, since there is no main routine) rather than pytest.

Steps to Reproduce

Look at the ❌ . Here is the latest example: https://github.com/NCAR/ccpp-framework/actions/runs/7494120637/job/20401325581

Additional Context

To me the best solution to this is to correctly run these tests in the new .github/workflows/prebuild.yaml, and remove the old, deprecated .github/workflows/python.yaml

Output

See latest failed test log: https://github.com/NCAR/ccpp-framework/actions/runs/7494120637/job/20401325581

mkavulich commented 9 months ago

I partially figured out the "unclear reasons": the file pytest.ini specifies that pytest should only run in the "tests" directory (which no longer exists). Not sure why the tests are now failing rather than just no-opping, but that file should probably be removed as well.