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

Fixed Plotting for New CI #748

Merged
merged 1 commit into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ jobs:
if: ${{ always() }}
run: |
mkdir -p $GITHUB_WORKSPACE/test_report
cp -r $GITHUB_WORKSPACE/candidate/build/Run/output_${{ matrix.configuration }}/* $GITHUB_WORKSPACE/test_report/
cp -r $GITHUB_WORKSPACE/candidate/build/Run/output_diff/diff_plots/* $GITHUB_WORKSPACE/test_report/

- name: Attach diff plots to PR
if: ${{ failure() }}
Expand All @@ -214,5 +214,4 @@ jobs:
with:
name: test-reports
path: |
${{ github.workspace }}/test_report/**.html
${{ github.workspace }}/test_report/*/diff_plots
${{ github.workspace }}/test_report/*
15 changes: 7 additions & 8 deletions tests/local/utils/attach_all_plots.bash
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
PR=$1
CONFIG=$2
cwd=`pwd`
diffs=$GITHUB_WORKSPACE/test_report/$CONFIG/diff_plots
diffs=$GITHUB_WORKSPACE/test_report/$CONFIG

if [[ ! -d $diffs ]]; then
echo "No diff plots to attach!"
echo "No diff plots to attach at ${diffs}"
exit 0
fi

Expand All @@ -21,9 +21,8 @@ REPO=NCAR/wrf_hydro_nwm_public

cd $diffs

for d in `ls -1`
do
if [[ -d $d && `ls -1 $d` ]]; then
python $cwd/attach_plots_to_pr.py -r $REPO -p $PR -d -t "$TOKEN" --title "$title" $d/*
fi
done
# if $diffs directory is not empty, attach files in it
if [[ `ls -1 ./` ]]
then
python $cwd/attach_plots_to_pr.py -r $REPO -p $PR -d -t "$TOKEN" --title "$title" ./*
fi