Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust testing for new path checker file #16

Merged
merged 16 commits into from
Jun 18, 2024
23 changes: 14 additions & 9 deletions .github/workflows/run_jcb_basic_testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,14 @@ jobs:
JCB_REPO: https://github.com/NOAA-EMC/jcb.git

steps:
- name: Checkout application client repository
uses: actions/checkout@v3
with:
submodules: true

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Add repo url to the environment
run: |
JCB_APP_REPO="https://github.com/${{ github.repository }}"
JCB_APP_REPO="${{ github.repository }}"
echo "JCB_APP_REPO=${JCB_APP_REPO}" >> $GITHUB_ENV

- name: Determine the name of the client branch
Expand Down Expand Up @@ -63,11 +58,21 @@ jobs:
git config --global core.hooksPath empty_hooks
git clone --branch ${{ env.JCB_BRANCH }} --recursive $JCB_REPO jcb_repo

- name: Switch the application branch to match the action
- name: Clone the clients
run: |
cd jcb_repo
cd $(python get_submod_path.py $JCB_APP_REPO)
git checkout ${{ env.JCB_APP_BRANCH }}
pip install pyyaml
./jcb_client_init.py

# If all the branches are found then at this point everything should be good since
# jcb_client_init will check out the correct branches. If not then the app branch needs to
# be checked out explicitly.
if [ "${{ env.JCB_BRANCH }}" != "${{ env.JCB_APP_BRANCH }}" ]; then
echo "Checking out branch ${{ env.JCB_APP_BRANCH }} for ${{ env.JCB_APP_REPO }}"
app_path=$(python jcb_client_path.py $JCB_APP_REPO)
cd $app_path
git checkout ${{ env.JCB_APP_BRANCH }}
fi

- name: Install dependencies
run: |
Expand Down
Loading