Skip to content

Commit 00eedbf

Browse files
committed
CI: add type-checking workflow that runs mypy and pyright
1 parent 0e08a64 commit 00eedbf

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/type_check.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Type-check
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
workflow_dispatch:
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
type-check:
15+
runs-on: ubuntu-latest
16+
timeout-minutes: 5
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- uses: astral-sh/setup-uv@v5
21+
with:
22+
python-version: "3.11"
23+
24+
- name: env setup
25+
run: |
26+
uv venv .venv
27+
source .venv/bin/activate
28+
uv pip install .
29+
uv pip install mypy
30+
31+
- name: run mypy
32+
run: >
33+
mypy
34+
--no-incremental
35+
--cache-dir=/dev/null
36+
--soft-error-limit=-1
37+
--traceback
38+
numpy_financial
39+
40+
- name: run pyright
41+
uses: jakebailey/pyright-action@v2
42+
with:
43+
working-directory: numpy_financial

0 commit comments

Comments
 (0)