Skip to content

Commit 4073c53

Browse files
authored
Merge pull request #183 from lool/pretty-job-names
feat(ci): Add pretty names to submit-job
2 parents e6d5312 + cf352b8 commit 4073c53

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

.github/workflows/lava-test.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,32 @@ jobs:
3535
- name: "List jobs"
3636
id: listjobs
3737
run: |
38-
# json with list of relative filenames to LAVA templates
38+
# json with display names and relative filenames to LAVA templates
3939
J=$(find "${LAVA_CI}" -name '*.yaml' -print0 |
4040
jq --compact-output --raw-input --slurp '
4141
# split null-delimited list and remove last empty item
4242
split("\u0000")[:-1]
4343
# remove leading "ci/lava/"
4444
| map(sub("^ci/lava/"; ""))
45-
| {target: .}
45+
# build include entries with target and pretty name
46+
| map({
47+
target: .,
48+
name: (
49+
.
50+
| sub("\\.yaml$"; "")
51+
| gsub("/"; " ")
52+
)
53+
})
54+
# output as matrix.include list
55+
| { include: . }
4656
')
4757
echo "jobmatrix=$J" >> $GITHUB_OUTPUT
4858
echo "Preparing testjob files"
4959
5060
submit-job:
5161
needs: prepare-job-list
5262
runs-on: ubuntu-latest
63+
name: Submit ${{ matrix.name }}
5364
strategy:
5465
fail-fast: false
5566
matrix: ${{ fromJson(needs.prepare-job-list.outputs.jobmatrix) }}
@@ -59,7 +70,7 @@ jobs:
5970
with:
6071
fetch-depth: 0
6172

62-
- name: "Update test definition ${{ matrix.target }}"
73+
- name: Update test definition ${{ matrix.target }}
6374
run: |
6475
# e.g. qrb2210-rb1/boot.yaml
6576
TARGET="${{ matrix.target }}"
@@ -92,7 +103,7 @@ jobs:
92103
save_job_details: true
93104

94105
publish-test-results:
95-
name: "Publish Tests Results"
106+
name: Publish Tests Results
96107
needs: submit-job
97108
runs-on: ubuntu-latest
98109

@@ -102,7 +113,7 @@ jobs:
102113
with:
103114
path: artifacts
104115

105-
- name: "List files"
116+
- name: List files
106117
run: |
107118
echo $GITHUB_WORKSPACE
108119
ls -R $GITHUB_WORKSPACE

0 commit comments

Comments
 (0)