Skip to content

1 sub-directory [2 image files] #860

1 sub-directory [2 image files]

1 sub-directory [2 image files] #860

name: LogTalk (Ubuntu)
on: [push]
jobs:
workflow:
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: 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 -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
- name: Regenerate the application documentation
run: |
swilgt -g "{loader,lgtdoc(loader)},lgtdoc::directory('.')" -t halt
cd xml_docs
lgt2rst -s -- -q -p "Aliases example" -a "Paulo Moura" -v "Version 3.14"
make html
- name: Regenerate the application diagrams
run: |
swilgt -g "{loader,diagrams(loader)},diagrams::directory(aliases,'.',[omit_path_prefixes(['$GITHUB_WORKSPACE'])])" -t halt
lgt2svg
- name: Commit updates
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
mv xunit_report.html docs/reports/
mv coverage_report.html docs/reports/
rm -rf docs/api/*
mv xml_docs/_build/html/* docs/api/
rm -rf docs/diagrams/*.svg
mv *.svg docs/diagrams/
git add docs/*
git commit -m "Update testing reports, documentation, and diagrams"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
- name: Set workflow exit status after the test results
run: exit $EXIT