-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new CI for running mypy and pyright on webapp tool
Signed-off-by: Arthur Chan <[email protected]>
- Loading branch information
1 parent
9d9e2e4
commit 8a5b6aa
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Mypy-Pyright-webapp | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
main | ||
paths: | ||
- 'tools/web-fuzzing-introspection/**' | ||
- '.github/workflows/webapp-mypy.yml' | ||
permissions: read-all | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
name: Mypy-Pyright-webapp | ||
steps: | ||
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v2.4.0 | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v3.0.0 | ||
with: | ||
python-version: 3.8 | ||
- name: Install venv | ||
run: sudo apt-get install python3-venv | ||
- name: Set up venv | ||
run: python3 -m venv tools/web-fuzzing-introspection/.venv | ||
- name: Active venv dependencies | ||
run: source tools/web-fuzzing-introspection/.venv/bin/activate && pip install -r tools/web-fuzzing-introspection/requirements.txt | ||
- name: Install Dependencies | ||
Check warning Code scanning / Scorecard Pinned-Dependencies Medium
score is 2: pipCommand not pinned by hash
Click Remediation section below to solve this issue |
||
run: | | ||
pip install mypy types-PyYAML pyright types-requests | ||
Check warning Code scanning / Scorecard Pinned-Dependencies Medium
score is 2: pipCommand not pinned by hash
Click Remediation section below to solve this issue |
||
- name: mypy | ||
run: | | ||
cd tools/web-fuzzing-introspection && mypy --ignore-missing-imports --explicit-package-bases . | ||
- name: pyright | ||
run: | | ||
cd tools/web-fuzzing-introspection && pyright . --project=./.pyrightconfig.json --venvpath=./.venv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"exclude": [ | ||
"venv/", | ||
".venv/", | ||
"requirements.txt", | ||
".venv", | ||
] | ||
} |