File tree Expand file tree Collapse file tree 1 file changed +58
-0
lines changed Expand file tree Collapse file tree 1 file changed +58
-0
lines changed Original file line number Diff line number Diff line change 1+ name : ' Run tests with specified CWL runner'
2+ author : ' Tomoya Tanjo'
3+ description : ' Run tests with specified CWL runner'
4+ inputs :
5+ test-list :
6+ description : ' A file that lists test cases in cwltest format'
7+ required : true
8+ runner :
9+ description : ' full path to CWL runner to be tested'
10+ required : true
11+ timeout :
12+ description : ' timeout in seconds'
13+ required : false
14+ default : 30
15+ skip-python-install :
16+ description : ' skip installing python interpreter'
17+ required : false
18+ default : false
19+ allow-failure :
20+ description : ' whether this action always succeeds even if some tests fail'
21+ required : false
22+ default : false
23+ result-title :
24+ description : ' title for test result'
25+ required : false
26+ default : ' Test result'
27+ outputs :
28+ result :
29+ description : ' The file name that stores the result of tests in JUnit XMl format'
30+ value : ${{ steps.run-test.outputs.result }}
31+ runs :
32+ using : ' composite'
33+ steps :
34+ - name : Setup Python for testing
35+ if : ${{ inputs.skip-python-install == 'false' }}
36+ uses : actions/setup-python@v2
37+ with :
38+ python-version : ' 3.9.x'
39+ - name : Install cwltest
40+ shell : bash
41+ run : pip install cwltest
42+ - name : Run test
43+ id : run-test
44+ shell : bash
45+ run : |
46+ cwltest --tool ${{ inputs.runner }} --test ${{ inputs.test-list }} --timeout=${{ inputs.timeout }} --junit-xml=junit.xml; ret=$?
47+ echo "::set-output name=result::junit.xml"
48+ if [ ${{ inputs.allow-failure }} != 'false' ]; then
49+ exit $ret
50+ else
51+ exit 0
52+ fi
53+ - name : Publish the result of tests
54+ uses : EnricoMi/publish-unit-test-result-action@v1
55+ if : always()
56+ with :
57+ files : junit.xml
58+ check_name : ${{ inputs.result-title }}
You can’t perform that action at this time.
0 commit comments