mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +08:00
Deduplicate stubtest command in actions (#9444)
This commit is contained in:
5
.github/workflows/daily.yml
vendored
5
.github/workflows/daily.yml
vendored
@@ -78,7 +78,7 @@ jobs:
|
||||
sudo apt update && sudo apt install -y $PACKAGES
|
||||
fi
|
||||
|
||||
xvfb-run python tests/stubtest_third_party.py --specified-stubs-only --num-shards 4 --shard-index ${{ matrix.shard-index }}
|
||||
PYTHON_EXECUTABLE="xvfb-run python"
|
||||
else
|
||||
if [ "${{ runner.os }}" = "macOS" ] && [ -n "$PACKAGES" ]; then
|
||||
NONINTERACTIVE=1 brew install $PACKAGES
|
||||
@@ -88,9 +88,10 @@ jobs:
|
||||
choco install -y $PACKAGES
|
||||
fi
|
||||
|
||||
python tests/stubtest_third_party.py --specified-stubs-only --num-shards 4 --shard-index ${{ matrix.shard-index }}
|
||||
PYTHON_EXECUTABLE="python"
|
||||
fi
|
||||
|
||||
$PYTHON_EXECUTABLE tests/stubtest_third_party.py --specified-stubs-only --num-shards 4 --shard-index ${{ matrix.shard-index }}
|
||||
stub-uploader:
|
||||
name: Run the stub_uploader tests
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
6
.github/workflows/stubtest_third_party.yml
vendored
6
.github/workflows/stubtest_third_party.yml
vendored
@@ -66,7 +66,7 @@ jobs:
|
||||
sudo apt update && sudo apt install -y $PACKAGES
|
||||
fi
|
||||
|
||||
xvfb-run python tests/stubtest_third_party.py --specified-stubs-only $STUBS
|
||||
PYTHON_EXECUTABLE="xvfb-run python"
|
||||
else
|
||||
if [ "${{ runner.os }}" = "macOS" ] && [ -n "$PACKAGES" ]; then
|
||||
echo "Installing Homebrew packages: $PACKAGES"
|
||||
@@ -78,8 +78,10 @@ jobs:
|
||||
choco install -y $PACKAGES
|
||||
fi
|
||||
|
||||
python tests/stubtest_third_party.py --specified-stubs-only $STUBS
|
||||
PYTHON_EXECUTABLE="python"
|
||||
fi
|
||||
|
||||
$PYTHON_EXECUTABLE tests/stubtest_third_party.py --specified-stubs-only $STUBS
|
||||
else
|
||||
echo "Nothing to test"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user