Add CI linting using MyPy #1
1 changed files with 11 additions and 15 deletions
|
@ -6,20 +6,16 @@ name: Lint
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
name: MyPy
|
name: MyPy
|
||||||
runs-on: docker
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout the code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
# TODO: Replace with working action
|
- name: Set up the Python toolchain
|
||||||
- name: Set up Python environment
|
uses: actions/setup-python@v5
|
||||||
run: |
|
with:
|
||||||
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
|
python-version: "3.13"
|
||||||
python3 get-pip.py
|
cache: pip
|
||||||
python3 -m pip install virtualenv
|
- name: Set up the Python environment
|
||||||
python3 -m virtualenv venv
|
run: pip install -r requirements.txt
|
||||||
source venv/bin/activate
|
- name: Type-check the code
|
||||||
pip install -r requirements.txt
|
run: mypy *.py
|
||||||
- name: Type-check
|
|
||||||
run: |
|
|
||||||
source venv/bin/activate
|
|
||||||
mypy *.py
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue