mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-20 19:01:15 +08:00
Add support for Homebrew and Chocolatey (#9187)
This commit is contained in:
17
.github/workflows/daily.yml
vendored
17
.github/workflows/daily.yml
vendored
@@ -69,12 +69,23 @@ jobs:
|
||||
- name: Run stubtest
|
||||
shell: bash
|
||||
run: |
|
||||
if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then
|
||||
sudo apt update
|
||||
sudo apt install -y $(python tests/get_packages.py)
|
||||
PACKAGES=$(python tests/get_packages.py)
|
||||
|
||||
if [ "${{ runner.os }}" = "Linux" ]; then
|
||||
if [ -n "$PACKAGES" ]; then
|
||||
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 }}
|
||||
else
|
||||
if [ "${{ runner.os }}" = "macOS" ] && [ -n "$PACKAGES" ]; then
|
||||
NONINTERACTIVE=1 brew install $PACKAGES
|
||||
fi
|
||||
|
||||
if [ "${{ runner.os }}" = "Windows" ] && [ -n "$PACKAGES" ]; then
|
||||
choco install -y $PACKAGES
|
||||
fi
|
||||
|
||||
python tests/stubtest_third_party.py --specified-stubs-only --num-shards 4 --shard-index ${{ matrix.shard-index }}
|
||||
fi
|
||||
|
||||
|
||||
19
.github/workflows/stubtest_third_party.yml
vendored
19
.github/workflows/stubtest_third_party.yml
vendored
@@ -58,21 +58,24 @@ jobs:
|
||||
echo "Testing $STUBS..."
|
||||
PACKAGES=$(python tests/get_packages.py $STUBS)
|
||||
|
||||
if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then
|
||||
if [ "${{ runner.os }}" = "Linux" ]; then
|
||||
if [ -n "$PACKAGES" ]; then
|
||||
echo "Installing apt packages: $PACKAGES"
|
||||
sudo apt update && sudo apt install -y $PACKAGES
|
||||
fi
|
||||
|
||||
xvfb-run python tests/stubtest_third_party.py --specified-stubs-only $STUBS
|
||||
fi
|
||||
else
|
||||
if [ "${{ runner.os }}" = "macOS" ] && [ -n "$PACKAGES" ]; then
|
||||
echo "Installing Homebrew packages: $PACKAGES"
|
||||
NONINTERACTIVE=1 brew install $PACKAGES
|
||||
fi
|
||||
|
||||
if [ "${{ matrix.os }}" = "macos-latest" ]; then
|
||||
# Could install brew packages here if we run into stubs that need it
|
||||
python tests/stubtest_third_party.py --specified-stubs-only $STUBS
|
||||
fi
|
||||
if [ "${{ runner.os }}" = "Windows" ] && [ -n "$PACKAGES" ]; then
|
||||
echo "Installing Chocolatey packages: $PACKAGES"
|
||||
choco install -y $PACKAGES
|
||||
fi
|
||||
|
||||
if [ "${{ matrix.os }}" = "windows-latest" ]; then
|
||||
# Could install choco packages here if we run into stubs that need it
|
||||
python tests/stubtest_third_party.py --specified-stubs-only $STUBS
|
||||
fi
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user