-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtesting.yml
41 lines (39 loc) · 1.46 KB
/
testing.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Testing
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Install SWI-Prolog backend
uses: logtalk-actions/setup-swi-prolog@master
with:
swi-prolog-branch: stable
swi-prolog-version: latest
- name: Install Logtalk
uses: logtalk-actions/setup-logtalk@master
with:
logtalk-version: latest
- name: Checkout Logtalk application to be tested
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Define environment variable for the test results
run: echo "EXIT=0" >> $GITHUB_ENV
- name: Run the application tests
run: |
logtalk_tester -p swi -f xunit -c xml || EXIT=$?
xunit-viewer --results=xunit_report.xml --output=xunit_report.html
xsltproc --stringparam prefix work/$(basename $GITHUB_REPOSITORY)/$(basename $GITHUB_REPOSITORY)/ --stringparam url https://github.com/$GITHUB_REPOSITORY/tree/$GITHUB_SHA -o coverage_report.html coverage_report.xml
echo "EXIT=$EXIT" >> $GITHUB_ENV
- name: Upload xUnit report
uses: actions/upload-artifact@master
with:
name: xunit-report
path: xunit_report.html
- name: Upload code coverage report
uses: actions/upload-artifact@master
with:
name: code-coverage-report
path: coverage_report.html
- name: Set workflow exit status after the test results
run: exit $EXIT