Skip to content

Commit ae72359

Browse files
committed
[stubgenc] Move stubgenc CI test in separate workflow
1 parent ebd8d01 commit ae72359

File tree

2 files changed

+45
-5
lines changed

2 files changed

+45
-5
lines changed

.github/workflows/test_stubgenc.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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: Prepare env
31+
run: |
32+
python -m pip install -r test-requirements.txt
33+
python -m pip install pybind11 numpy
34+
python -m pip install git+https://github.com/sizmailov/python_example.git@pybind11-mypy-demo
35+
python -m pip install .
36+
37+
- name: Run stubgen
38+
run: |
39+
rm -rf test-data/stubgen/python_example
40+
stubgen -p python_example -o test-data/stubgen/
41+
42+
- name: Check output
43+
run: |
44+
git diff --exit-code test-data/stubgen/python_example

test-requirements.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,4 @@ typing>=3.5.2; python_version < '3.5'
1414
py>=1.5.2
1515
virtualenv<20
1616
setuptools!=50
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
17+
importlib-metadata==0.20

0 commit comments

Comments
 (0)