-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (39 loc) · 954 Bytes
/
pytest.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
name: Pytest
on:
push:
branches:
- main
- development
- test-stage
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run tests and generate XML report
env:
PYTHONPATH: ${{ github.workspace }}/src
run: pytest --junitxml=pytest-report.xml
continue-on-error: false
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: pytest-results
path: pytest-report.xml
- name: Notify on success
if: success()
run: echo "Tests passed successfully"
- name: Notify on failure
if: failure()
run: echo "Tests failed"