-
Notifications
You must be signed in to change notification settings - Fork 460
43 lines (41 loc) · 1.16 KB
/
tests.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
name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
types:
- opened
- ready_for_review
- reopened
- synchronize
workflow_call:
jobs:
test_package:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: "3.11"
architecture: x64
cache: pip
cache-dependency-path: "**/*requirements*.txt"
- name: Install dependencies
run: |
pip install -r code/requirements.txt -r code/dev-requirements.txt -r code/backend/requirements.txt
- name: Run Unit tests
working-directory: ./code
run: python -m pytest -m "not azure and not functional" --junitxml=coverage-junit.xml --cov=. --cov-report xml:coverage.xml
- uses: actions/upload-artifact@v4
with:
name: coverage
path: |
code/coverage-junit.xml
code/coverage.xml
if-no-files-found: error
- name: Run Functional tests
working-directory: ./code
run: python -m pytest -m "functional"