@@ -33,35 +33,26 @@ outputs:
33
33
# Generated or supplied badge properties
34
34
badge-name :
35
35
description : " Code coverage badge name waiting for issues/#1"
36
- value : ${{ steps.badge-wrapper-actions-issue-1.outputs.badge-name }}
37
36
badge-label :
38
37
description : " Code coverage badge label waiting for issues/#1"
39
- value : ${{ steps.badge-wrapper-actions-issue-1.outputs.badge-label }}
40
38
badge-status :
41
39
description : " Code coverage badge status waiting for issues/#1"
42
- value : " ${{ steps.mineunit-coverage.outputs.total }} in ${{ steps.mineunit-coverage.outputs.files }} files"
43
40
badge-color :
44
41
description : " Code coverage badge color waiting for issues/#1"
45
- value : ${{ steps.badge-wrapper-actions-issue-1.outputs.badge-color }}
46
42
47
43
# Mineunit test framework output
48
44
mineunit-stdout :
49
45
description : " Stdout produced during busted run"
50
- value : ${{ steps.mineunit-tests.outputs.stdout }}
51
46
mineunit-spec-missing :
52
47
description : " Set to true if no spec files found for busted"
53
- value : ${{ steps.mineunit-tests.outputs.spec-missing }}
54
48
55
49
mineunit-report :
56
50
description : " Mineunit detailed test report"
57
- value : ${{ steps.mineunit-report.outputs.report }}
58
51
59
52
coverage-total :
60
53
description : " Total test coverage percentage"
61
- value : ${{ steps.mineunit-coverage.outputs.total }}
62
54
coverage-files :
63
55
description : " Number of files tested and total number of source files"
64
- value : ${{ steps.mineunit-coverage.outputs.files }}
65
56
66
57
# Help content / on demand documentation
67
58
help-busted-spec-missing :
@@ -79,49 +70,5 @@ outputs:
79
70
```
80
71
81
72
runs :
82
- using : composite
83
- steps :
84
- - name : install mineunit
85
- shell : bash
86
- run : |
87
- sudo apt-get install -y luarocks > /dev/null
88
- luarocks install --server=https://luarocks.org/dev --local mineunit ${{ inputs.mineunit-version }}
89
- - id : mineunit-tests
90
- name : mineunit runner
91
- working-directory : " ${{ inputs.working-directory }}"
92
- shell : bash
93
- run : |
94
- set +eo pipefail
95
- exec 3>&1
96
- OUT="$($HOME/.luarocks/bin/mineunit -c ${{ inputs.mineunit-args }} | tee >(cat - >&3); exit ${PIPESTATUS[0]})"
97
- ERR=$?
98
- exec 3>&-
99
- grep_eronly=(grep '0 successes / 0 failures / [1-9] error.\? / 0 pending')
100
- grep_nospec=(grep 'No test files found')
101
- ("${grep_eronly[@]}"<<<"$OUT" && "${grep_nospec[@]}"<<<"$OUT")&>/dev/null && echo "spec-missing=true" >> $GITHUB_OUTPUT
102
- OUT="$(sed 's/\x1B\[[0-9;]\{1,\}[A-Za-z]//g'<<<"$OUT")"
103
- printf 'stdout<<END-OF-MINEUNIT-CONTENT\n%s\nEND-OF-MINEUNIT-CONTENT' "${OUT}" >> $GITHUB_OUTPUT
104
- exit $ERR
105
- - id : mineunit-report
106
- name : mineunit coverage report
107
- working-directory : " ${{ inputs.working-directory }}"
108
- shell : bash
109
- run : |
110
- $HOME/.luarocks/bin/mineunit -r
111
- OUT="$(awk -v p=0 '/^----/{p++;next}p==2{exit}p' luacov.report.out | sort -hrk4)"
112
- printf 'report<<END-OF-MINEUNIT-CONTENT\n%s\nEND-OF-MINEUNIT-CONTENT' "${OUT}" >> $GITHUB_OUTPUT
113
- - id : mineunit-coverage
114
- name : collect coverage data
115
- working-directory : " ${{ inputs.working-directory }}"
116
- shell : bash
117
- run : |
118
- echo "total=$(tail -n 2 luacov.report.out | grep ^Total | grep -o '[0-9.]\+%$')" >> $GITHUB_OUTPUT
119
- awk -v p=0 '/^----/{p++;next}p==2{exit}p' luacov.report.out | sort -hrk4 > luacov.report.sum
120
- echo "files=$(grep -cv '\s0\.00%' luacov.report.sum)/$(wc -l<luacov.report.sum)" >> $GITHUB_OUTPUT
121
- - id : badge-wrapper-actions-issue-1
122
- name : Input wrapper while waiting for actions in actions feature
123
- shell : bash
124
- run : |
125
- echo "badge-name=${{ inputs.badge-name }}" >> $GITHUB_OUTPUT
126
- echo "badge-label=${{ inputs.badge-label }}" >> $GITHUB_OUTPUT
127
- echo "badge-color=${{ inputs.badge-color }}" >> $GITHUB_OUTPUT
73
+ using : docker
74
+ image : Dockerfile
0 commit comments