File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Pull Request Checks
2+
3+ on :
4+ pull_request :
5+ branches : [ main ]
6+
7+ workflow_dispatch :
8+
9+ jobs :
10+ ruff :
11+ name : Lint with ruff
12+ uses : ./.github/workflows/python-job.yml
13+ with :
14+ run : |
15+ ruff check --show-fixes
16+ ruff format --check --diff
17+
18+ secrets : inherit
19+
20+ test :
21+ name : Run tests
22+ uses : ./.github/workflows/python-job.yml
23+ with :
24+ run : |
25+ set -o pipefail
26+ mkdir reports
27+ pytest --junit-xml=reports/pytest.xml --cov --cov-report=term-missing:skip-covered | tee reports/coverage.txt
28+ artifact : pytest-results
29+ artifact_path : reports/
30+ secrets : inherit
31+
32+ report-coverage :
33+ name : Report tests coverage
34+ runs-on : ubuntu-latest
35+ if : ${{ github.event_name == 'pull_request' }}
36+ needs : [test]
37+ steps :
38+ - name : Download Pytest results
39+ uses : actions/download-artifact@v4
40+ with :
41+ name : pytest-results
42+ path : reports
43+
44+ - name : Add PR comment
45+ uses : MishaKav/pytest-coverage-comment@main
46+ with :
47+ junitxml-path : reports/pytest.xml
48+ pytest-coverage-path : reports/coverage.txt
49+ report-only-changed-files : true
Original file line number Diff line number Diff line change 1+ name : Python Job
2+
3+ on :
4+ workflow_call :
5+ inputs :
6+ python-version :
7+ type : string
8+ default : " 3.9"
9+ run :
10+ required : true
11+ type : string
12+ artifact :
13+ type : string
14+ default : ' '
15+ required : false
16+ artifact_path :
17+ type : string
18+ default : ' '
19+ required : false
20+
21+ jobs :
22+ run :
23+ runs-on : ubuntu-latest
24+ steps :
25+ - name : Checkout source code
26+ uses : actions/checkout@v4
27+ with :
28+ ref : " ${{ github.head_ref || github.ref }}"
29+
30+ - name : Set up Python ${{ inputs.python-version }}
31+ uses : actions/setup-python@v5
32+ with :
33+ cache : ' pip'
34+ python-version : ${{ inputs.python-version }}
35+
36+ - name : Install project dependencies
37+ run : |
38+ python -m pip install --upgrade pip
39+ pip install .[dev,test]
40+
41+ - name : Run Command
42+ run : |
43+ ${{ inputs.run }}
44+
45+ - name : Upload artifacts
46+ uses : actions/upload-artifact@v4
47+ if : ${{ github.event.inputs.artifact == '' || github.event.inputs.artifact_path == '' }}
48+ with :
49+ name : ${{ inputs.artifact }}
50+ path : ${{ inputs.artifact_path }}
51+ if-no-files-found : ignore
52+
Original file line number Diff line number Diff line change 2727import urllib .request
2828import urllib .parse
2929import zipfile
30-
31-
30+ import typing
3231#
3332# Initial setup
3433#
@@ -288,7 +287,7 @@ def console_tee(text, skip_logging=False):
288287@dataclasses .dataclass
289288class Requirement :
290289 key : str
291- cmd : tuple [str , ...]
290+ cmd : tuple [typing . Union [ str , pathlib . Path ] , ...]
292291 fail_msg : tuple [str , ...]
293292
294293 def check_availability (self , action , args ):
@@ -2439,7 +2438,7 @@ def run_installer(args):
24392438 "Disable sending analytics data" ,
24402439 key = "send_analytics_data" ,
24412440 value = "--no-analytics" ,
2442- msg = "Sending analytcs data has been disabled for this session." ,
2441+ msg = "Sending analytics data has been disabled for this session." ,
24432442 )
24442443 cfg_menu .add_option (
24452444 "Enable sending analytics data" ,
You can’t perform that action at this time.
0 commit comments