Skip to content

Commit 08cff1a

Browse files
authored
Add handling to report-failures when no log files are available (#1009)
1 parent 4e1642d commit 08cff1a

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

.github/workflows/test-upstream.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,15 +203,20 @@ jobs:
203203
steps:
204204
- uses: actions/checkout@v3
205205
- uses: actions/download-artifact@v3
206-
with:
207-
name: test-ubuntu-latest-py3.10-results
208-
- name: Prepare issue label
206+
- name: Prepare logs & issue label
209207
run: |
208+
# TODO: remove this if xarray-contrib/issue-from-pytest-log no longer needs a log-path
209+
if [ -f test-ubuntu-latest-py3.10-results/test-ubuntu-latest-py3.10-results.jsonl ]; then
210+
cp test-ubuntu-latest-py3.10-results/test-ubuntu-latest-py3.10-results.jsonl results.jsonl
211+
else
212+
touch results.jsonl
213+
fi
214+
210215
# convert which_upstream to lowercase
211216
echo "which_upstream_lower=${which_upstream,,}" >> $GITHUB_ENV
212217
- name: Open or update issue on failure
213218
uses: xarray-contrib/[email protected]
214219
with:
215-
log-path: test-ubuntu-latest-py3.10-results.jsonl
220+
log-path: results.jsonl
216221
issue-title: ⚠️ Upstream CI ${{ env.which_upstream }} failed ⚠️
217222
issue-label: upstream-${{ env.which_upstream_lower }}

0 commit comments

Comments
 (0)