File tree Expand file tree Collapse file tree 4 files changed +46
-34
lines changed Expand file tree Collapse file tree 4 files changed +46
-34
lines changed Original file line number Diff line number Diff line change 47
47
run : tox -e ${{ matrix.toxenv }} --notest
48
48
- name : test
49
49
run : tox -e ${{ matrix.toxenv }} --skip-pkg-install
50
-
51
- stubgenc :
52
- # Check stub file generation for a small pybind11 project
53
- # (full text match is required to pass)
54
- runs-on : ubuntu-latest
55
- steps :
56
-
57
- - uses : actions/checkout@v2
58
-
59
- - name : initialize submodules
60
- run : git submodule update --init
61
-
62
- - name : Setup 🐍 3.8
63
- uses : actions/setup-python@v2
64
- with :
65
- python-version : 3.8
66
-
67
- - name : Prepare env
68
- run : |
69
- python -m pip install -r test-requirements.txt
70
- python -m pip install .
71
-
72
- - name : Run stubgen
73
- run : |
74
- rm -rf test-data/stubgen/python_example
75
- stubgen -p python_example -o test-data/stubgen/
76
-
77
- - name : Check output
78
- run : |
79
- git diff --exit-code test-data/stubgen/
Original file line number Diff line number Diff line change
1
+ name : Test stubgenc on pybind11-mypy-demo
2
+
3
+ on :
4
+ push :
5
+ branches : [master]
6
+ tags : ['*']
7
+ pull_request :
8
+ paths :
9
+ - ' mypy/stubgenc.py'
10
+ - ' mypy/stubdoc.py'
11
+ - ' test-data/stubgen/**'
12
+
13
+ jobs :
14
+ stubgenc :
15
+ # Check stub file generation for a small pybind11 project
16
+ # (full text match is required to pass)
17
+ runs-on : ubuntu-latest
18
+ steps :
19
+
20
+ - uses : actions/checkout@v2
21
+
22
+ - name : initialize submodules
23
+ run : git submodule update --init
24
+
25
+ - name : Setup 🐍 3.8
26
+ uses : actions/setup-python@v2
27
+ with :
28
+ python-version : 3.8
29
+
30
+ - name : Test stubgenc
31
+ run : misc/test-stubgenc.sh
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # This script is expected to be run from root of the mypy repo
3
+
4
+ # Install dependencies, demo project and mypy
5
+ python -m pip install -r test-requirements.txt
6
+ python -m pip install pybind11 numpy
7
+ python -m pip install git+https://github.com/sizmailov/python_example.git@pybind11-mypy-demo
8
+ python -m pip install .
9
+
10
+ # Remove expected stubs and generate new inplace
11
+ rm -rf test-data/stubgen/python_example
12
+ stubgen -p python_example -o test-data/stubgen/
13
+
14
+ # Compare generated stubs to expected ones
15
+ git diff --exit-code test-data/stubgen/python_example
Original file line number Diff line number Diff line change @@ -15,7 +15,3 @@ py>=1.5.2
15
15
virtualenv<20
16
16
setuptools!=50
17
17
importlib-metadata==0.20
18
- # stubgen compatibility with pybind
19
- pybind11
20
- numpy
21
- git+https://github.com/sizmailov/python_example.git@mypy-stubgen-test
You can’t perform that action at this time.
0 commit comments