1
- # This workflow will install Python dependencies, run tests and lint with a single version of Python
2
- # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3
-
4
1
name : Python application
5
2
6
3
on :
@@ -13,17 +10,37 @@ permissions:
13
10
jobs :
14
11
build :
15
12
runs-on : ubuntu-latest
16
-
17
13
steps :
18
14
- uses : actions/checkout@v4
15
+
19
16
- name : Set up Python 3.10
20
17
uses : actions/setup-python@v4
21
18
with :
22
- python-version : " 3.10"
23
- - name : Lint with flake8
19
+ python-version : " 3.10.14"
20
+
21
+ - name : Update pip and install build tools
22
+ run : |
23
+ python -m pip install --upgrade pip
24
+ pip install wheel setuptools Cython
25
+
26
+ - name : Install system dependencies
27
+ run : |
28
+ sudo apt-get update
29
+ sudo apt-get install -y portaudio19-dev python3-dev build-essential
30
+
31
+ - name : Install PyTorch dependencies first
32
+ run : |
33
+ pip install torch==2.3.1+cu121 torchaudio==2.3.1+cu121 torchvision==0.18.1+cu121 -f https://download.pytorch.org/whl/torch_stable.html
34
+
35
+ - name : Install other dependencies
36
+ run : |
37
+ pip install -r requirements.txt
38
+
39
+ - name : Run tests
24
40
run : |
25
- # stop the build if there are Python syntax errors or undefined names
26
- flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
27
- # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
28
- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
41
+ pytest tests/ --cov=./ --cov-report=xml
29
42
43
+ - name : Upload coverage reports to Codecov
44
+ uses : codecov/codecov-action@v3
45
+ env :
46
+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
0 commit comments