Skip to content

Commit c035307

Browse files
authored
Update python-app.yml
1 parent f619b49 commit c035307

File tree

1 file changed

+7
-21
lines changed

1 file changed

+7
-21
lines changed

.github/workflows/python-app.yml

+7-21
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:
@@ -9,31 +6,20 @@ on:
96
pull_request:
107
branches: [ "main" ]
118

12-
permissions:
13-
contents: read
14-
159
jobs:
1610
build:
17-
1811
runs-on: ubuntu-latest
1912

2013
steps:
21-
- uses: actions/checkout@v4
22-
- name: Set up Python 3.10
23-
uses: actions/setup-python@v3
14+
- uses: actions/checkout@v3
15+
- name: Set up Python
16+
uses: actions/setup-python@v4
2417
with:
25-
python-version: "3.10"
18+
python-version: '3.10' # ✅ Python version correct likhna
2619
- name: Install dependencies
2720
run: |
2821
python -m pip install --upgrade pip
29-
pip install flake8 pytest
30-
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
31-
- name: Lint with flake8
32-
run: |
33-
# stop the build if there are Python syntax errors or undefined names
34-
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
35-
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
36-
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
37-
- name: Test with pytest
22+
pip install -r requirements.txt
23+
- name: Run tests
3824
run: |
39-
pytest
25+
python -m unittest discover

0 commit comments

Comments
 (0)