This action reads and parses output.xml from Robot Framework test run and outputs it. By default action checks if pull_request_id
is defined and outputs the report to the found pull request. If it doesn't find pull_request_id
then it will use the sha
value by default. These both values can be overwritten by user to have more control. It will also supports outputting report to job summary.
If you are using RF version 7 or greater you need to use version 2.4 or greater of the action otherwise it will fail due changes in the output.xml
.
generate_report:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Download reports
uses: actions/download-artifact@v1
with:
name: reports
- name: Send report to commit
uses: joonvena/[email protected]
with:
gh_access_token: ${{ secrets.GITHUB_TOKEN }}
Example usage with robotframework-docker-action
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Execute tests
uses: joonvena/[email protected]
- name: Upload test results
uses: actions/upload-artifact@v1
if: always()
with:
name: reports
path: reports
generate_report:
if: always()
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Download reports
uses: actions/download-artifact@v1
with:
name: reports
- name: Send report to commit
uses: joonvena/[email protected]
with:
gh_access_token: ${{ secrets.GITHUB_TOKEN }}
Available settings:
Name | Default | Description |
---|---|---|
gh_access_token | Token to access GH API. In most cases you can use GITHUB_TOKEN that is available in the workflow | |
report_path | 'reports' | Path to reports from the download artifact action |
sha | ${{ github.sha }} | SHA of the commit that triggered the tests |
pull_request_id | ${{ github.event.number }} | ID of the pull request that triggered pipeline |
summary | 'true' | Add report to job summary |
only_summary | 'false' | Only output report to job summary |
show_passed_tests | 'true' | If false only failed tests are shown |
failed_tests_on_top | 'false' | If true failed tests are shown at the top of the report |