File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Python application
2+
3+ on :
4+ push :
5+ branches : [ "main" ]
6+ pull_request :
7+ branches : [ "main" ]
8+
9+ permissions :
10+ contents : read
11+
12+ jobs :
13+ build :
14+
15+ runs-on : ubuntu-latest
16+
17+ steps :
18+ - uses : actions/checkout@v4
19+ - name : Set up Python 3.10
20+ uses : actions/setup-python@v3
21+ with :
22+ python-version : " 3.10"
23+ - name : Install dependencies
24+ run : |
25+ python -m pip install --upgrade pip
26+ pip install flake8 pytest
27+ if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
28+ - name : Lint with flake8
29+ run : |
30+ # stop the build if there are Python syntax errors or undefined names
31+ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
32+ # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
33+ flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
34+ - name : Test with pytest
35+ run : |
36+ pytest
You can’t perform that action at this time.
0 commit comments