Skip to content

Commit 4a9afe8

Browse files
committed
update workflow2
1 parent 31317ef commit 4a9afe8

File tree

1 file changed

+27
-10
lines changed

1 file changed

+27
-10
lines changed

.github/workflows/python-app.yml

+27-10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
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-
41
name: Python application
52

63
on:
@@ -13,17 +10,37 @@ permissions:
1310
jobs:
1411
build:
1512
runs-on: ubuntu-latest
16-
1713
steps:
1814
- uses: actions/checkout@v4
15+
1916
- name: Set up Python 3.10
2017
uses: actions/setup-python@v4
2118
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
2440
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
2942
43+
- name: Upload coverage reports to Codecov
44+
uses: codecov/codecov-action@v3
45+
env:
46+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)