forked from testit-tms/python-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (38 loc) · 1.08 KB
/
python-app.yml
File metadata and controls
46 lines (38 loc) · 1.08 KB
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: Python application
on:
workflow_dispatch:
push:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
# Install project dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
# Execute test and generate report
- name: Test with pytest
run: |
echo "run test"
# Install Test IT CLI and submit test results to TMS
- name: Submit results
if: always()
run: |
pip install testit-cli
testit results import \
--url https://team-kuk2.testit.software \
--project-id 68fab8a1-ba48-4f7b-a00b-f2216ac18f5c \
--configuration-id 8d610909-58ad-4c40-86bb-583b726e65d3 \
--testrun-name "GitHub test run" \
--results results/test-results.xml
env:
TMS_TOKEN: ${{ secrets.TMS_TOKEN }}