File tree Expand file tree Collapse file tree 2 files changed +79
-0
lines changed
Expand file tree Collapse file tree 2 files changed +79
-0
lines changed Original file line number Diff line number Diff line change 1+ # This workflow will install Python dependencies, run tests and lint with a single version of Python
2+ # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+ name : Linting and unit tests
5+ on :
6+ push :
7+ branches : [ "master" ]
8+ pull_request :
9+ branches : [ "master" ]
10+
11+ jobs :
12+ build :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Checkout
16+ uses : actions/checkout@v4
17+
18+ - name : Set up Python 3.12
19+ uses : actions/setup-python@v3
20+ with :
21+ python-version : " 3.12"
22+
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+
29+ - name : Lint with flake8
30+ run : |
31+ # stop the build if there are Python syntax errors or undefined names
32+ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
33+ # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide, we further relax this
34+ flake8 . --count --exit-zero --max-complexity=30 --max-line-length=130 --statistics
35+
36+ - name : Test with pytest
37+ run : |
38+ pytest
Original file line number Diff line number Diff line change 1+ name : CodeQL
2+
3+ on :
4+ push :
5+ branches : [ "master" ]
6+ pull_request :
7+ branches : [ "master" ]
8+ schedule :
9+ - cron : " 44 11 * * 0"
10+
11+ jobs :
12+ analyze :
13+ name : Analyze
14+ runs-on : ubuntu-latest
15+ permissions :
16+ actions : read
17+ contents : read
18+ security-events : write
19+
20+ strategy :
21+ fail-fast : false
22+ matrix :
23+ language : [ python ]
24+
25+ steps :
26+ - name : Checkout
27+ uses : actions/checkout@v4
28+
29+ - name : Initialize CodeQL
30+ uses : github/codeql-action/init@v3
31+ with :
32+ languages : ${{ matrix.language }}
33+ queries : +security-and-quality
34+
35+ - name : Autobuild
36+ uses : github/codeql-action/autobuild@v3
37+
38+ - name : Perform CodeQL Analysis
39+ uses : github/codeql-action/analyze@v3
40+ with :
41+ category : " /language:${{ matrix.language }}"
You can’t perform that action at this time.
0 commit comments