CI: Upload failed screendump tests when run in github actions

Commit: 
https://github.com/vim/vim/commit/8314de8fd4aa4d18fc524f960f5d683a2d8cba32
Author: Christian Brabandt <[email protected]>
Date:   Wed May 15 21:48:11 2024 +0200

    CI: Upload failed screendump tests when run in github actions
    
    It's a bit of a pain to debug failing screendump tests without knowing
    exactly what went wrong. Therefore include actions/upload-artifact for
    the Github CI runners and have them uploaded those failing screen dump
    tests automatically.
    
    Let's add this step to each of the Linux/MacOS/Windows workflows but do
    not duplicate the code, factor it out to a single file
    .github/actions/screendump/action.yml and reference this one from the
    main ci.yml file
    
    Example:
    https://github.com/chrisbra/vim/actions/runs/9085493619
    
    closes: #14771
    
    Co-authored-by: dundargoc <[email protected]>
    Co-authored-by: Aliaksei Budavei <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/.github/actions/screendump/action.yml 
b/.github/actions/screendump/action.yml
new file mode 100644
index 000000000..19eb9b6d0
--- /dev/null
+++ b/.github/actions/screendump/action.yml
@@ -0,0 +1,26 @@
+name: 'screendump'
+description: "Upload failed syntax tests"
+runs:
+  using: "composite"
+  steps:
+    - name: Upload failed syntax tests
+      uses: actions/upload-artifact@v4
+      with:
+        # Name of the artifact to upload.
+        name: ${{ github.workflow }}-${{ github.job }}-${{ join(matrix.*, '-') 
}}-failed-syntax-tests
+
+        # A file, directory or wildcard pattern that describes what
+        # to upload.
+        path: |
+         ${{ github.workspace }}/runtime/syntax/testdir/failed/*
+         ${{ github.workspace }}/src/testdir/failed/*
+        # The desired behavior if no files are found using the
+        # provided path.
+        if-no-files-found: ignore
+
+        # Duration after which artifact will expire in days. 0 means
+        # using repository settings.
+        retention-days: 0
+
+        # If true, an artifact with a matching name will be deleted
+        overwrite: true
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 74a6674c5..1110665ec 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -270,6 +270,9 @@ jobs:
           do_test() { sg audio "sg $(id -gn) '$*'"; }
           do_test make ${SHADOWOPT} ${TEST}
 
+      - if: ${{ !cancelled() }}
+        uses: ./.github/actions/screendump
+
       - name: Vim tags
         if: contains(matrix.extra, 'vimtags')
         run: |
@@ -396,6 +399,9 @@ jobs:
         run: |
           make ${TEST}
 
+      - if: ${{ !cancelled() }}
+        uses: ./.github/actions/screendump
+
   windows:
     runs-on: windows-2022
 
@@ -691,6 +697,9 @@ jobs:
             nmake -nologo -f Make_mvc.mak tiny VIMPROG=.. im  || exit 1
           )
 
+      - if: ${{ !cancelled() }}
+        uses: ./.github/actions/screendump
+
       - name: Generate gcov files
         if: matrix.coverage
         shell: msys2 {0}
diff --git a/Filelist b/Filelist
index cd787ef64..081d164de 100644
--- a/Filelist
+++ b/Filelist
@@ -10,6 +10,7 @@ SRC_ALL =     \
                .github/ISSUE_TEMPLATE/feature_request.md \
                .github/workflows/ci.yml \
                .github/workflows/codeql-analysis.yml \
+               .github/actions/screendump/action.yml \
                .github/workflows/coverity.yml \
                .github/dependabot.yml \
                .gitignore \

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1s7KnE-003x9M-7u%40256bit.org.

Raspunde prin e-mail lui