mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-18 09:55:59 +08:00
CI: Don't run stubtest_stdlib on PRs that don't touch the stdlib (#7895)
* Don't run stubtest_stdlib on PRs that don't touch the stdlib
This commit is contained in:
43
.github/workflows/stubtest_stdlib.yml
vendored
Normal file
43
.github/workflows/stubtest_stdlib.yml
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
name: Run stubtest on the stdlib
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
pull_request:
|
||||
paths:
|
||||
- 'stdlib/**'
|
||||
- '.github/workflows/**'
|
||||
- 'tests/**'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
PIP_DISABLE_PIP_VERSION_CHECK: 1
|
||||
|
||||
jobs:
|
||||
stubtest-stdlib:
|
||||
name: Check stdlib with stubtest
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
# macos-11 does not have tcl/tk installed, needed for stubtesting tkinter
|
||||
os: ["ubuntu-latest", "windows-latest", "macos-10.15"]
|
||||
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11-dev"]
|
||||
fail-fast: false
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Update pip
|
||||
run: python -m pip install -U pip
|
||||
- name: Install dependencies
|
||||
run: pip install $(grep tomli== requirements-tests.txt) $(grep mypy== requirements-tests.txt)
|
||||
- name: Run stubtest
|
||||
run: python tests/stubtest_stdlib.py
|
||||
23
.github/workflows/tests.yml
vendored
23
.github/workflows/tests.yml
vendored
@@ -92,29 +92,6 @@ jobs:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
no-comments: ${{ matrix.python-version != '3.9' || matrix.python-platform != 'Linux' }} # Having each job create the same comment is too noisy.
|
||||
|
||||
stubtest-stdlib:
|
||||
name: Check stdlib with stubtest
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
# macos-11 does not have tcl/tk installed, needed for stubtesting tkinter
|
||||
os: ["ubuntu-latest", "windows-latest", "macos-10.15"]
|
||||
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11-dev"]
|
||||
fail-fast: false
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Update pip
|
||||
run: python -m pip install -U pip
|
||||
- name: Install dependencies
|
||||
run: pip install $(grep tomli== requirements-tests.txt) $(grep mypy== requirements-tests.txt)
|
||||
- name: Run stubtest
|
||||
run: python tests/stubtest_stdlib.py
|
||||
|
||||
stubtest-third-party:
|
||||
name: Check third party stubs with stubtest
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
Reference in New Issue
Block a user