File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : CodeQL Analysis
2+
3+ on :
4+ push :
5+ branches : [ "main", "master" ]
6+ pull_request :
7+ branches : [ "main", "master" ]
8+ schedule :
9+ - cron : ' 30 1 * * 0'
10+
11+ jobs :
12+ analyze :
13+ name : CodeQL Analysis
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 repository
27+ uses : actions/checkout@v4
28+
29+ - name : Initialize CodeQL
30+ uses : github/codeql-action/init@v4
31+ with :
32+ languages : ${{ matrix.language }}
33+
34+ - name : Perform CodeQL Analysis
35+ uses : github/codeql-action/analyze@v4
36+ with :
37+ category : " /language:${{ matrix.language }}"
Original file line number Diff line number Diff line change 1+ name : Lint and Style Checks
2+
3+ on :
4+ push :
5+ branches : [ "main", "master" ]
6+ pull_request :
7+ branches : [ "main", "master" ]
8+
9+ jobs :
10+ lint :
11+ name : Lint & Style Checks
12+ runs-on : ubuntu-latest
13+ strategy :
14+ fail-fast : false
15+ matrix :
16+ language : [ 'python' ]
17+
18+ steps :
19+ - name : Checkout repository
20+ uses : actions/checkout@v4
21+
22+ - name : Set up Python 3.10
23+ uses : actions/setup-python@v5
24+ with :
25+ python-version : " 3.10"
26+
27+ - name : Cache pip dependencies
28+ id : cache-pip
29+ uses : actions/cache@v4
30+ with :
31+ path : ~/.cache/pip
32+ key : ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml', 'requirements.txt') }}
33+ restore-keys : |
34+ ${{ runner.os }}-pip-
35+
36+ - name : Install System Dependencies (Tkinter)
37+ run : |
38+ sudo apt-get update
39+ sudo apt-get install -y python3-tk
40+
41+ - name : Install Python and Project Dependencies
42+ run : |
43+ python -m pip install --upgrade pip
44+ pip install flake8
45+ if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
46+ pip install -e .
47+
48+ - name : Run Style & Syntax Check (Flake8)
49+ run : |
50+ echo "STEP 1: Checking for critical syntax errors..."
51+ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
52+
53+ echo "STEP 2: Checking for code style warnings..."
54+ flake8 . --count --exit-zero --max-complexity=18 --max-line-length=127 --statistics
Original file line number Diff line number Diff line change 1+ name : Automated Testing
2+
3+ on :
4+ push :
5+ branches : [ "main", "master" ]
6+ pull_request :
7+ branches : [ "main", "master" ]
8+
9+ jobs :
10+ test :
11+ name : Test & Get Coverage
12+ runs-on : ubuntu-latest
13+ strategy :
14+ fail-fast : false
15+ matrix :
16+ language : [ 'python' ]
17+
18+ steps :
19+ - name : Checkout repository
20+ uses : actions/checkout@v4
21+
22+ - name : Set up Python 3.10
23+ uses : actions/setup-python@v5
24+ with :
25+ python-version : " 3.10"
26+
27+ - name : Cache pip dependencies
28+ id : cache-pip
29+ uses : actions/cache@v4
30+ with :
31+ path : ~/.cache/pip
32+ key : ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml', 'requirements.txt') }}
33+ restore-keys : |
34+ ${{ runner.os }}-pip-
35+
36+ - name : Install System Dependencies (Tkinter/XVFB)
37+ run : |
38+ sudo apt-get update
39+ sudo apt-get install -y python3-tk xvfb
40+
41+ - name : Install Python and Project Dependencies
42+ run : |
43+ python -m pip install --upgrade pip
44+ pip install pytest pytest-cov
45+ if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
46+ pip install -e .
47+
48+ - name : Run All Tests and Generate Reports
49+ run : |
50+ echo "Running tests with coverage within a virtual display..."
51+ xvfb-run --auto-servernum pytest --cov=. --cov-report=xml --junitxml=junit.xml -o junit_family=legacy tests/
52+
53+ - name : Upload Coverage Report to Codecov
54+ uses : codecov/codecov-action@v4
55+ with :
56+ token : ${{ secrets.CODECOV_TOKEN }}
57+ files : ./coverage.xml
58+ fail_ci_if_error : true
You can’t perform that action at this time.
0 commit comments