Skip to content

Check (but not fix) Fortran format in GitHub actions#717

Merged
mkavulich merged 11 commits intoNCAR:developfrom
climbfuji:feature/codee_ci
Feb 6, 2026
Merged

Check (but not fix) Fortran format in GitHub actions#717
mkavulich merged 11 commits intoNCAR:developfrom
climbfuji:feature/codee_ci

Conversation

@climbfuji
Copy link
Collaborator

@climbfuji climbfuji commented Jan 22, 2026

Check (but not fix) Fortran format in GitHub actions.

This PR enables automated checking of the Fortran format using Codee in GitHub actions. The new test will fail if running Codee updates files that are modified in a pull request. The system tells the user to either run Codee locally (which is almost trivial when following the GitHub workflow) or applying a diff that the system produces.

This PR does not enable automatic reformatting and updates of pull requests, because this doesn't work if the pull request comes from a fork (which we usually require for the ccpp-framework repository). The stencil code to do this is submitted as comment in the current PR, however.

The checking is limited to the static Fortran source files in this repository, not the auto-generated Fortran code from capgen or prebuild - this will be addressed in a future PR.

While at it, I updated the existing GitHub workflows to run on develop only, since main is now frozen`, and to avoid concurrent workflow runs (i.e. cancel currently running tests from the same pull request if an update is pushed).

User interface changes?: No

Working toward #703

Testing:
test removed: n/a
unit tests: all pass
system tests: all pass
manual testing: n/a
test added: GitHub actions test to check formatting of static Fortran source files in this repository

@climbfuji climbfuji marked this pull request as ready for review January 22, 2026 21:08
@climbfuji climbfuji requested review from a team and gold2718 as code owners January 22, 2026 21:08
@climbfuji climbfuji self-assigned this Jan 22, 2026
@climbfuji climbfuji added the fix-fortran-format Fix Fortran formatting label Jan 22, 2026
@climbfuji climbfuji force-pushed the feature/codee_ci branch 3 times, most recently from 64b1798 to 4cc9c80 Compare January 22, 2026 21:17
@climbfuji climbfuji removed the fix-fortran-format Fix Fortran formatting label Jan 22, 2026
@climbfuji climbfuji force-pushed the feature/codee_ci branch 2 times, most recently from 8e7925c to e115fe9 Compare January 22, 2026 21:23
@climbfuji climbfuji changed the title Feature/codee ci Check (but not fix) Fortran format in GitHub actions Jan 22, 2026
!!XXgoldyXX: To do, statistics output
module ccpp_hash_table

! Modify this file ...
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines 4-5 will be removed before merging the PR, this will allow the newly added test to pass.

Copy link
Member

@dustinswales dustinswales left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@climbfuji This is great. Thanks!
I wonder if we could add a github secret and allow the workflow to be run from forks?
(I will look into this...)

@climbfuji
Copy link
Collaborator Author

@mkavulich This is ready to go in

@mkavulich mkavulich merged commit 4f36e47 into NCAR:develop Feb 6, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants