Skip to content

Commit cab65a2

Browse files
CopilotMLopez-Ibanez
authored andcommitted
* .github/workflows/moocore.yml: Upload failed test outputs as artifacts. Use
basename in copy command to ensure files are properly named in the artifact directory and avoid potential conflicts.
1 parent 9f073e3 commit cab65a2

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

.github/workflows/moocore.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,18 @@ jobs:
7373
run: |
7474
source env/bin/activate
7575
make -C c test OPT_CFLAGS="-O3 -flto"
76+
77+
- name: Collect failed test outputs
78+
if: failure()
79+
run: |
80+
mkdir -p failed-test-outputs
81+
find "$RUNNER_TEMP" \( -name "*_*.out" -o -name "*_*.out.xz" \) -type f -exec sh -c 'cp "$1" "failed-test-outputs/$(basename "$1")"' _ {} \; || true
82+
ls -la failed-test-outputs/ || true
83+
84+
- name: Upload failed test outputs
85+
if: failure()
86+
uses: actions/upload-artifact@v4
87+
with:
88+
name: failed-tests-${{ matrix.os }}-${{ matrix.cc }}-${{ github.run_id }}
89+
path: failed-test-outputs/
90+
if-no-files-found: ignore

0 commit comments

Comments
 (0)