-
Notifications
You must be signed in to change notification settings - Fork 37
57 lines (48 loc) · 1.44 KB
/
Copy pathtest-runner.yml
File metadata and controls
57 lines (48 loc) · 1.44 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
47
48
49
50
51
52
53
54
55
56
57
name: Python Tests
run-name: Rest API Python Tests
on:
workflow_dispatch:
inputs:
python_version:
description: 'Python version'
required: true
default: '3.12'
push:
jobs:
Run-Tests:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Python version
uses: actions/setup-python@v3
with:
python-version: '${{ github.event.inputs.python_version }}'
- name: Run Tests
run: |
chmod +x -R ${{ github.workspace }}
pip install --upgrade pip
pip install -r requirements.txt
export PYTHONPATH=${PYTHONPATH}:${{ github.workspace }}
pytest -s tests/part_01/test_users.py --junitxml=results.xml --html=report.html
- name: Publish Test Results
uses: dorny/test-reporter@v3
if: success() || failure()
with:
name: Test Results
path: results.xml
reporter: java-junit
- name: Create Test Summary
uses: test-summary/action@dist
if: success() || failure()
with:
paths: results.xml
- name: Upload pytest Test Results
uses: actions/upload-artifact@v7
if: success() || failure()
with:
name: test-results
path: |
results.xml
report.html
assets