Skip to content

Commit 2a8580e

Browse files
committed
.github: allow workflow caller to pass test dir
Signed-off-by: Richard Alpe <[email protected]>
1 parent ffd0c05 commit 2a8580e

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

.github/workflows/test.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,16 @@ on:
2929
required: false
3030
type: string
3131
default: ''
32+
test-path:
33+
required: false
34+
type: string
35+
default: 'test'
3236

3337
env:
3438
FLV: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.flavor || inputs.flavor }}
3539
INFIX_REPO: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.infix_repo || inputs.infix_repo }}
3640
NINEPM_CONF: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.ninepm-conf || inputs.ninepm-conf }}
41+
TEST_PATH: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.test-path || inputs.test-path }}
3742

3843
jobs:
3944
test:
@@ -91,21 +96,21 @@ jobs:
9196
- name: Publish Test Result for x86_64${{ steps.vars.outputs.flv }}
9297
# Ensure this runs even if Regression Test fails
9398
if: always()
94-
run: cat test/.log/last/result-gh.md >> $GITHUB_STEP_SUMMARY
99+
run: cat $TEST_PATH/.log/last/result-gh.md >> $GITHUB_STEP_SUMMARY
95100

96101
- name: Generate Test Report for x86_64${{ steps.vars.outputs.flv }}
97102
# Ensure this runs even if Regression Test fails
98103
if: always()
99104
run: |
100105
asciidoctor-pdf \
101-
--theme test/9pm/report/theme.yml \
102-
-a pdf-fontsdir=test/9pm/report/fonts \
103-
test/.log/last/report.adoc \
104-
-o test/.log/last/report.pdf
106+
--theme $TEST_PATH/9pm/report/theme.yml \
107+
-a pdf-fontsdir=$TEST_PATH/9pm/report/fonts \
108+
$TEST_PATH/.log/last/report.adoc \
109+
-o $TEST_PATH/.log/last/report.pdf
105110
106111
- name: Upload Test Report as Artifact
107112
uses: actions/upload-artifact@v4
108113
with:
109114
name: test-report
110-
path: test/.log/last/report.pdf
115+
path: ${{ env.TEST_PATH }}/.log/last/report.pdf
111116

0 commit comments

Comments
 (0)