Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4a7e14e

Browse files
authored
Deduplicate stubtest command in actions (#9444)
1 parent feb9b2d commit 4a7e14e

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

.github/workflows/daily.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
sudo apt update && sudo apt install -y $PACKAGES
7979
fi
8080
81-
xvfb-run python tests/stubtest_third_party.py --specified-stubs-only --num-shards 4 --shard-index ${{ matrix.shard-index }}
81+
PYTHON_EXECUTABLE="xvfb-run python"
8282
else
8383
if [ "${{ runner.os }}" = "macOS" ] && [ -n "$PACKAGES" ]; then
8484
NONINTERACTIVE=1 brew install $PACKAGES
@@ -88,9 +88,10 @@ jobs:
8888
choco install -y $PACKAGES
8989
fi
9090
91-
python tests/stubtest_third_party.py --specified-stubs-only --num-shards 4 --shard-index ${{ matrix.shard-index }}
91+
PYTHON_EXECUTABLE="python"
9292
fi
9393
94+
$PYTHON_EXECUTABLE tests/stubtest_third_party.py --specified-stubs-only --num-shards 4 --shard-index ${{ matrix.shard-index }}
9495
stub-uploader:
9596
name: Run the stub_uploader tests
9697
runs-on: ubuntu-latest

.github/workflows/stubtest_third_party.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
sudo apt update && sudo apt install -y $PACKAGES
6767
fi
6868
69-
xvfb-run python tests/stubtest_third_party.py --specified-stubs-only $STUBS
69+
PYTHON_EXECUTABLE="xvfb-run python"
7070
else
7171
if [ "${{ runner.os }}" = "macOS" ] && [ -n "$PACKAGES" ]; then
7272
echo "Installing Homebrew packages: $PACKAGES"
@@ -78,8 +78,10 @@ jobs:
7878
choco install -y $PACKAGES
7979
fi
8080
81-
python tests/stubtest_third_party.py --specified-stubs-only $STUBS
81+
PYTHON_EXECUTABLE="python"
8282
fi
83+
84+
$PYTHON_EXECUTABLE tests/stubtest_third_party.py --specified-stubs-only $STUBS
8385
else
8486
echo "Nothing to test"
8587
fi

0 commit comments

Comments
 (0)