Skip to content

Commit 0d6e743

Browse files
committed
For new CI, fixed paths for copying of plots when there's a difference in output from PR changes
Updating scripts to work with new Github CI
1 parent 86f57ab commit 0d6e743

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

.github/workflows/test-pr.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ jobs:
200200
if: ${{ always() }}
201201
run: |
202202
mkdir -p $GITHUB_WORKSPACE/test_report
203-
cp -r $GITHUB_WORKSPACE/candidate/build/Run/output_${{ matrix.configuration }}/* $GITHUB_WORKSPACE/test_report/
203+
cp -r $GITHUB_WORKSPACE/candidate/build/Run/output_diff/diff_plots/* $GITHUB_WORKSPACE/test_report/
204204
205205
- name: Attach diff plots to PR
206206
if: ${{ failure() }}
@@ -214,5 +214,4 @@ jobs:
214214
with:
215215
name: test-reports
216216
path: |
217-
${{ github.workspace }}/test_report/**.html
218-
${{ github.workspace }}/test_report/*/diff_plots
217+
${{ github.workspace }}/test_report/*

tests/local/utils/attach_all_plots.bash

+7-8
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
PR=$1
44
CONFIG=$2
55
cwd=`pwd`
6-
diffs=$GITHUB_WORKSPACE/test_report/$CONFIG/diff_plots
6+
diffs=$GITHUB_WORKSPACE/test_report/$CONFIG
77

88
if [[ ! -d $diffs ]]; then
9-
echo "No diff plots to attach!"
9+
echo "No diff plots to attach at ${diffs}"
1010
exit 0
1111
fi
1212

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

2222
cd $diffs
2323

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

0 commit comments

Comments
 (0)