Skip to content

Commit db6badc

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

File tree

3 files changed

+45
-35
lines changed

3 files changed

+45
-35
lines changed

.github/workflows/test.yml

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -47,33 +47,3 @@ jobs:
4747
run: tox -e ${{ matrix.toxenv }} --notest
4848
- name: test
4949
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/

.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)