Skip to content

Commit

Permalink
Adjust testing for new path checker file (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
danholdaway authored Jun 18, 2024
1 parent 3e553bb commit 11897d1
Showing 1 changed file with 14 additions and 9 deletions.
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

0 comments on commit 11897d1

Please sign in to comment.