Yurii Paniv commited on
Commit
dda017e
1 Parent(s): 8253e81

Add autotests

Browse files
Files changed (2) hide show
  1. .github/workflows/tests.yml +46 -0
  2. pytest.ini +1 -1
.github/workflows/tests.yml ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Python CI Build
2
+
3
+ name: Python package
4
+
5
+ on: [push]
6
+
7
+ jobs:
8
+ build:
9
+
10
+ runs-on: ubuntu-latest
11
+ #strategy:
12
+ # matrix:
13
+ # python-version: ["3.7", "3.8", "3.9", "3.10"]
14
+
15
+ steps:
16
+ - uses: actions/checkout@v3
17
+ - name: Set up Python 3.9 #${{ matrix.python-version }}
18
+ uses: actions/setup-python@v4
19
+ with:
20
+ python-version: 3.9 #${{ matrix.python-version }}
21
+ - name: Install dependencies
22
+ run: |
23
+ python -m pip install --upgrade pip
24
+ pip install pytest
25
+ pip install -r requirements-dev.txt
26
+ #- name: Lint with flake8
27
+ # run: |
28
+ # # stop the build if there are Python syntax errors or undefined names
29
+ # flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
30
+ # # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
31
+ # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
32
+ - name: Test with pytest
33
+ run: |
34
+ pytest
35
+ - name: Code Coverage Report
36
+ uses: irongut/[email protected]
37
+ with:
38
+ filename: /**/coverage.xml
39
+ badge: true
40
+ fail_below_min: true
41
+ format: markdown
42
+ hide_branch_rate: false
43
+ hide_complexity: true
44
+ indicators: true
45
+ output: both
46
+ thresholds: '60 80'
pytest.ini CHANGED
@@ -1,3 +1,3 @@
1
  # pytest.ini
2
  [pytest]
3
- addopts = --cov --cov-report html --cov-branch
 
1
  # pytest.ini
2
  [pytest]
3
+ addopts = --cov --cov-report html --cov-report xml --cov-branch