|
1 | 1 | name: 'test_artifacts' |
2 | 2 | description: "Upload failed test artifacts" |
| 3 | +inputs: |
| 4 | + artifact-name: |
| 5 | + description: Name of the artifact |
| 6 | + required: true |
| 7 | + |
3 | 8 | runs: |
4 | 9 | using: "composite" |
5 | 10 | steps: |
6 | | - - name: Collect matrix properties for naming |
7 | | - uses: actions/github-script@v8 |
8 | | - id: matrix-props |
9 | | - env: |
10 | | - MATRIX_PROPS: ${{ toJSON(matrix) }} |
11 | | - with: |
12 | | - # An array-flattening-to-string JavaScript function. |
13 | | - script: | |
14 | | - const f = function (x) { return x.toString().length > 0; } |
15 | | - const g = function (x) { |
16 | | - return (Array.isArray(x)) |
17 | | - ? x.filter(f) |
18 | | - .map((function (h) { return function (y) { return h(y); }; })(g)) |
19 | | - .join('-') |
20 | | - : x; |
21 | | - } |
22 | | - return Object.values(JSON.parse(process.env.MATRIX_PROPS)) |
23 | | - .filter(f) |
24 | | - .map(g) |
25 | | - .join('-'); |
26 | | - # By default, the JSON-encoded return value of the function is |
27 | | - # set as the "result". |
28 | | - result-encoding: string |
| 11 | +# MacVim: We don't use a matrix within the reused |
| 12 | +# workflow, and so would prefer to manually pass |
| 13 | +# in the name of the artifact rather than deriving |
| 14 | +# it from the matrix automatically like in Vim |
| 15 | +# upstream. |
| 16 | +# - name: Collect matrix properties for naming |
| 17 | +# uses: actions/github-script@v8 |
| 18 | +# id: matrix-props |
| 19 | +# env: |
| 20 | +# MATRIX_PROPS: ${{ toJSON(inputs) }} |
| 21 | +# with: |
| 22 | +# # An array-flattening-to-string JavaScript function. |
| 23 | +# script: | |
| 24 | +# const f = function (x) { return x.toString().length > 0; } |
| 25 | +# const g = function (x) { |
| 26 | +# return (Array.isArray(x)) |
| 27 | +# ? x.filter(f) |
| 28 | +# .map((function (h) { return function (y) { return h(y); }; })(g)) |
| 29 | +# .join('-') |
| 30 | +# : x; |
| 31 | +# } |
| 32 | +# return Object.values(JSON.parse(process.env.MATRIX_PROPS)) |
| 33 | +# .filter(f) |
| 34 | +# .map(g) |
| 35 | +# .join('-'); |
| 36 | +# # By default, the JSON-encoded return value of the function is |
| 37 | +# # set as the "result". |
| 38 | +# result-encoding: string |
29 | 39 | - name: Upload failed tests |
30 | 40 | uses: actions/upload-artifact@v4 |
31 | 41 | with: |
|
35 | 45 | github.run_attempt, |
36 | 46 | github.job, |
37 | 47 | strategy.job-index, |
38 | | - steps.matrix-props.outputs.result) }} |
| 48 | + inputs.artifact-name) }} |
39 | 49 |
|
40 | 50 | # A file, directory or wildcard pattern that describes what |
41 | 51 | # to upload. |
|
0 commit comments