Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mypy / pyright to a new CI for webapp tool #1563

Merged
merged 3 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/webapp-mypy.yml
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: cd tools/web-fuzzing-introspection && python3 -m venv .venv
- name: Active venv dependencies
run: cd tools/web-fuzzing-introspection && source .venv/bin/activate && pip install -r ./requirements.txt
- name: Install Dependencies
Fixed Show fixed Hide fixed
Fixed Show fixed Hide fixed
Dismissed Show dismissed Hide dismissed
run: |
pip install mypy types-PyYAML pyright types-requests
Dismissed Show dismissed Hide dismissed
- name: mypy
run: |
cd tools/web-fuzzing-introspection && mypy --ignore-missing-imports --explicit-package-bases .
- name: pyright
run: |
cd tools/web-fuzzing-introspection && source .venv/bin/activate && pyright . --project=./.pyrightconfig.json --venvpath=./.venv
8 changes: 8 additions & 0 deletions tools/web-fuzzing-introspection/.pyrightconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"exclude": [
"venv/",
".venv/",
"requirements.txt",
".venv",
]
}