Skip to content

Commit

Permalink
Update general-ci-tests.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
manishvenu authored Aug 29, 2024
1 parent 6f10075 commit 436ff22
Showing 1 changed file with 13 additions and 24 deletions.
37 changes: 13 additions & 24 deletions .github/workflows/general-ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ on:
branches: ["138-set-up-github-actions-ci-testing" ]
pull_request:
branches: [ "138-set-up-github-actions-ci-testing" ]

# This workflow contains 3 tests:
# 1. Does standalone mom build and run?
# 2. Does it pass the tests/check_default_params.py test?
# 3. Do the scripts in cime_config pass the black formatter?
jobs:
# This workflow contains 4 jobs
# Build checks out MOM through the CESM and lets us run the standalone version

check_standalone_mom_lightweight_examples:
# The type of runner that the job will run on
runs-on: ubuntu-latest
Expand All @@ -34,74 +36,61 @@ jobs:
sudo apt-get install -y csh
echo "::endgroup::"
# Checkout CESM, Build MOM Standalone
# Checkout CESM and externals
- name: Checkout CESM and Externals
run: |
git clone https://github.com/ESCOMP/CESM.git -b cesm3_0_alpha03a cesm3_0_alpha03a
cd cesm3_0_alpha03a
./bin/git-fleximod update
# Checkout the correct MOM Branch
- name: Handle Pull Request
- name: Checkout initial event (Pull Request)
if: ${{ github.event_name == 'pull_request' }}
run: |
echo "Handling pull request"
cd $GITHUB_WORKSPACE/cesm3_0_alpha03a/components/mom/
git fetch origin pull/${{ github.event.pull_request.number }}/head:pr-${{ github.event.pull_request.number }}
git checkout pr-${{ github.event.pull_request.number }}
- name: Handle Push
- name: Checkout initial event (Push)
if: ${{ github.event_name == 'push' }}
run: |
echo "Handling push"
cd $GITHUB_WORKSPACE/cesm3_0_alpha03a/components/mom/
git checkout ${{ github.sha }}
# Build the standalone mom using the macos script. build_examples-ncar doesn't work.
- name: Build Standalone MOM
run: |
cd $GITHUB_WORKSPACE/cesm3_0_alpha03a/components/mom/standalone/build
./build_examples-darwin.sh
- name: Setup upterm session
uses: lhotari/action-upterm@v1
if: ${{ failure() }}
with:
## If no one connects after 5 minutes, shut down server.
wait-timeout-minutes: 5
# CDs into a couple MOM examples and runs MOM in them. These are very light weight.
- name: Run Double Gyre Test
run: |
cd $GITHUB_WORKSPACE/cesm3_0_alpha03a/components/mom/standalone/examples/double_gyre
$GITHUB_WORKSPACE/cesm3_0_alpha03a/components/mom/standalone/build/gnu/MOM6/MOM6
- name: Setup upterm session
uses: lhotari/action-upterm@v1
if: ${{ failure() }}
with:
## If no one connects after 5 minutes, shut down server.
wait-timeout-minutes: 5
- name: Run Single Column KPP Test
run: |
cd $GITHUB_WORKSPACE/cesm3_0_alpha03a/components/mom/standalone/examples/single_column/KPP
$GITHUB_WORKSPACE/cesm3_0_alpha03a/components/mom/standalone/build/gnu/MOM6/MOM6
# Job to run the check_default_params test
check_default_params_job:
# Job to run the check_default_params script, which is a test in and of it self
check_default_params:

runs-on: ubuntu-latest

# This runs the check_default_params test
steps:
# Checkout the repo
- uses: actions/checkout@v4
# 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
# Job to run the black formatter for cime_config, see black documentation for more info
check_black_format_for_cime_config:

runs-on: ubuntu-latest

# This performs black formatting checks in the cime_config folder
steps:
# Checkout the repo
- uses: actions/checkout@v4
Expand Down

0 comments on commit 436ff22

Please sign in to comment.