-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (31 loc) · 982 Bytes
/
unit_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
name: Formatting and Unit Tests
on:
push:
jobs:
unit_tests:
name: Unit Test
runs-on: ubuntu-latest
permissions:
checks: write # Required for Publish Test Results
pull-requests: write # Required for Publish Test Results
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: 'pip' # caching pip dependencies
- run : pip install -r requirements-dev.txt
- name: Linting and formatting
uses: pre-commit/[email protected]
with:
extra_args: --all-files --show-diff-on-failure
- name: Unit tests
run: |
pytest --cov=manual_scans --cov=utils --cov-branch --cov-fail-under=15 unittests
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: "test_reports/*.xml"