-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathaction.yml
59 lines (58 loc) · 2.03 KB
/
action.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
51
52
53
54
55
56
57
58
59
name: "Robot Reporter"
description: "Parses robot framework test reports and outputs the results in commit that triggered the tests"
inputs:
gh_access_token:
description: "Token to access the API"
required: true
report_path:
description: "Path to report"
required: true
default: "reports"
sha:
description: "SHA of the commit tha triggered the tests"
required: false
default: "${{ github.sha }}"
pull_request_id:
description: "ID of the Pull Request"
required: false
default: "${{ github.event.number }}"
summary:
description: "Add report to job summary"
required: false
default: "true"
only_summary:
description: "Only output report to job summary"
required: false
default: "false"
show_passed_tests:
description: "If false only failed tests are shown"
required: false
default: "true"
failed_tests_on_top:
description: "If true failed tests are shown at the top of the report"
required: false
default: "false"
runs:
using: "composite"
steps:
- shell: bash
run: |
export OWNER="$(echo '${{ github.repository }}' | awk -F / '{print $1}' | sed -e 's/:refs//')"
export REPO="$(echo '${{ github.repository }}' | awk -F / '{print $2}' | sed -e 's/:refs//')"
echo "REPOSITORY_OWNER=$OWNER" >> $GITHUB_ENV
echo "REPOSITORY_NAME=$REPO" >> $GITHUB_ENV
- shell: bash
run: ${{ github.action_path }}/report.sh
env:
GH_ACCESS_TOKEN: ${{ inputs.gh_access_token }}
REPORT_PATH: ${{ inputs.report_path }}
REPOSITORY_OWNER: "${{ env.REPOSITORY_OWNER }}"
REPOSITORY: "${{ env.REPOSITORY_NAME }}"
COMMIT_SHA: "${{ inputs.sha }}"
PR_ID: "${{ inputs.pull_request_id }}"
SUMMARY: "${{ inputs.summary }}"
GITHUB_STEP_SUMMARY: $GITHUB_STEP_SUMMARY
ONLY_SUMMARY: "${{ inputs.only_summary }}"
SHOW_PASSED_TESTS: "${{ inputs.show_passed_tests }}"
GITHUB_API_URL: $GITHUB_API_URL
FAILED_TESTS_ON_TOP: "${{ inputs.failed_tests_on_top }}"