Skip to content
Prev Previous commit
Next Next commit
Back stubtest-third-party for requirements.txt chages cases
  • Loading branch information
donbarbos committed Oct 22, 2025
commit 300b45bc0a8521bf41fe8524e7bb973327d4304c
50 changes: 50 additions & 0 deletions .github/workflows/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,56 @@ jobs:
- name: Run stubtest
run: python tests/stubtest_stdlib.py

# This job only runs when requirements.txt is changed
stubtest-third-party:
name: "stubtest: third party"
if: ${{ github.repository == 'python/typeshed' && github.event_name != 'schedule' }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
shard-index: [0, 1, 2, 3]
fail-fast: false
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: "3.13"
cache: pip
cache-dependency-path: |
requirements-tests.txt
stubs/**/METADATA.toml
- name: Install dependencies
run: pip install -r requirements-tests.txt
- name: Install required system packages
shell: bash
run: |
PACKAGES=$(python tests/get_stubtest_system_requirements.py)
if [ "${{ runner.os }}" = "Linux" ]; then
if [ -n "$PACKAGES" ]; then
printf "Installing APT packages:\n $(echo $PACKAGES | sed 's/ /\n /g')\n"
sudo apt-get update -q && sudo apt-get install -qy $PACKAGES
fi
else
if [ "${{ runner.os }}" = "macOS" ] && [ -n "$PACKAGES" ]; then
printf "Installing Homebrew packages:\n $(echo $PACKAGES | sed 's/ /\n /g')\n"
brew install -q $PACKAGES
fi
if [ "${{ runner.os }}" = "Windows" ] && [ -n "$PACKAGES" ]; then
printf "Installing Chocolatey packages:\n $(echo $PACKAGES | sed 's/ /\n /g')\n"
choco install -y $PACKAGES
fi
fi
- name: Run stubtest
shell: bash
run: |
if [ "${{ runner.os }}" = "Linux" ]; then
PYTHON_EXECUTABLE="xvfb-run python"
else
PYTHON_EXECUTABLE="python"
fi
$PYTHON_EXECUTABLE tests/stubtest_third_party.py --ci-platforms-only --num-shards 4 --shard-index ${{ matrix.shard-index }}

stub-uploader:
name: stub_uploader tests
if: ${{ github.repository == 'python/typeshed' || github.event_name != 'schedule' }}
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/stubtest_third_party.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ jobs:
shell: bash
run: |
# This only runs stubtest on changed stubs, because it is much faster.
# Use the stubsabot.yml workflow to run stubtest on third-party stubs.
function find_stubs {
git diff --name-only origin/${{ github.base_ref }} HEAD | \
egrep ^stubs/ | cut -d "/" -f 2 | sort -u | \
Expand Down