Skip to content

Commit cdcd4a5

Browse files
committed
Add new CI for running mypy and pyright on webapp tool
Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
1 parent 9d9e2e4 commit cdcd4a5

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

.github/workflows/webapp-mypy.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Mypy-Pyright-webapp
2+
3+
on:
4+
pull_request:
5+
branches:
6+
main
7+
paths:
8+
- 'tools/web-fuzzing-introspection/**'
9+
- '.github/workflows/webapp-mypy.yml'
10+
permissions: read-all
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
name: Mypy-Pyright-webapp
15+
steps:
16+
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v2.4.0
17+
- name: Set up Python 3.8
18+
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v3.0.0
19+
with:
20+
python-version: 3.8
21+
- name: Install venv
22+
run: sudo apt-get install python3-venv
23+
- name: Set up venv
24+
run: cd tools/web-fuzzing-introspection && python3 -m venv .venv
25+
- name: Active venv dependencies
26+
run: cd tools/web-fuzzing-introspection && source .venv/bin/activate && pip install -r ./requirements.txt
27+
- name: Install Dependencies
28+
run: |
29+
pip install mypy types-PyYAML pyright types-requests
30+
- name: mypy
31+
run: |
32+
cd tools/web-fuzzing-introspection && mypy --ignore-missing-imports --explicit-package-bases .
33+
- name: pyright
34+
run: |
35+
cd tools/web-fuzzing-introspection && source .venv/bin/activate && pyright . --project=./.pyrightconfig.json --venvpath=./.venv
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"exclude": [
3+
"venv/",
4+
".venv/",
5+
"requirements.txt",
6+
".venv",
7+
]
8+
}

0 commit comments

Comments
 (0)