-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (40 loc) · 1.24 KB
/
testrail.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
name: TestRail
permissions:
actions: read
contents: read
on:
workflow_run:
workflows: ["Build"]
types:
- completed
jobs:
testrail:
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Download code coverage results
uses: actions/download-artifact@v4
with:
name: code-coverage-report
github-token: ${{ github.token }}
run-id: ${{ github.event.workflow_run.id }}
- name: Upload Test Results to TestRail
env:
TR_INSTANCE: ${{ secrets.TR_INSTANCE }}
TR_PROJECT_NAME: ${{ secrets.TR_PROJECT_NAME }}
TR_USER_EMAIL: ${{ secrets.TR_USER_EMAIL }}
TR_PASSWORD: ${{ secrets.TR_PASSWORD }}
run: |
pip install trcli
trcli -y \
-h "https://$TR_INSTANCE.testrail.io" \
--project "$TR_PROJECT_NAME" \
-u $TR_USER_EMAIL \
-p $TR_PASSWORD \
parse_junit \
--title "Automated Tests - ${{ github.sha }}" \
--run-description ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \
-f "junit-report.xml"