-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtesting_multiple_backends.yml
50 lines (48 loc) · 1.77 KB
/
testing_multiple_backends.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
42
43
44
45
46
47
48
49
50
name: Testing
on: [push]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
backend: [eclipse, swi-prolog]
steps:
- if: matrix.backend == 'eclipse'
name: Install backend
uses: logtalk-actions/setup-eclipse@master
with:
eclipse-version: '7.0_54'
- if: matrix.backend == 'swi-prolog'
name: Install backend
uses: logtalk-actions/setup-swi-prolog@master
with:
swi-prolog-version: latest
- name: Install Logtalk
uses: logtalk-actions/setup-logtalk@master
with:
logtalk-version: git
- 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 ${{ matrix.backend }} -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: ${{ matrix.backend }}-xunit-report
path: xunit_report.html
- name: Upload code coverage report
uses: actions/upload-artifact@master
with:
name: ${{ matrix.backend }}-code-coverage-report
path: coverage_report.html
- name: Set workflow exit status after the test results
run: exit $EXIT