From dc36294b71fa4acfaa0a7d659f39bdbcc16d07a3 Mon Sep 17 00:00:00 2001 From: manishvenu <80477243+manishvenu@users.noreply.github.com> Date: Tue, 27 Aug 2024 12:09:34 -0600 Subject: [PATCH] Update general-ci-tests.yml with black formatting job & simple checkout Move checkout from default_params_job to separate job (simple_checkout) and list as a "need" on the check_default_params and black_check.. job --- .github/workflows/general-ci-tests.yml | 30 ++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/.github/workflows/general-ci-tests.yml b/.github/workflows/general-ci-tests.yml index 44d9ae4..bb580f8 100644 --- a/.github/workflows/general-ci-tests.yml +++ b/.github/workflows/general-ci-tests.yml @@ -35,8 +35,7 @@ jobs: # echo Add other actions to build, # echo test, and deploy your project. - # Job to run the check_default_params test - check_default_params_job: + simple_checkout: # The type of runner that the job will run on runs-on: ubuntu-latest @@ -45,11 +44,30 @@ jobs: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v4 - # Runs a set of commands using the runners shell: - # Install pip - # Install yaml with pip - # Run test + # Job to run the check_default_params test + check_default_params_job: + # The type of runner that the job will run on + runs-on: ubuntu-latest + needs: simple_checkout + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Runs the test - name: Run the check_default_params script run: python tests/check_default_params.py + + # Job to run the black formatter for cime_config + black_check_for_cime_config: + # The type of runner that the job will run on + runs-on: ubuntu-latest + needs: simple_checkout + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Run black check + - uses: psf/black@stable + with: + options: "--check --verbose" + src: "./cime_config" + +