stubtest_third_party: do not install apt packages in the same script (#6714)

This commit is contained in:
Akuli
2021-12-28 12:33:49 +02:00
committed by GitHub
parent 8d5d2520ac
commit 4aa4cb9ae2
4 changed files with 26 additions and 29 deletions

View File

@@ -52,5 +52,7 @@ jobs:
python-version: 3.9
- name: Install dependencies
run: pip install $(grep tomli== requirements-tests.txt)
- name: Install apt packages
run: sudo apt install -y $(python tests/get_apt_packages.py)
- name: Run stubtest
run: python tests/stubtest_third_party.py --num-shards 4 --shard-index ${{ matrix.shard-index }} --sudo-install-apt
run: python tests/stubtest_third_party.py --num-shards 4 --shard-index ${{ matrix.shard-index }}

View File

@@ -131,7 +131,12 @@ jobs:
STUBS=$(git diff --name-only origin/${{ github.base_ref }} HEAD | egrep ^stubs/ | cut -d "/" -f 2 | sort -u | (while read stub; do [ -d stubs/$stub ] && echo $stub || true; done))
if test -n "$STUBS"; then
echo "Testing $STUBS..."
python tests/stubtest_third_party.py --sudo-install-apt $STUBS
APT_PACKAGES=$(python tests/get_apt_packages.py $STUBS)
if test -n "$APT_PACKAGES"; then
echo "Installing apt packages: $APT_PACKAGES"
sudo apt install -y $APT_PACKAGES
fi
python tests/stubtest_third_party.py $STUBS
else
echo "Nothing to test"
fi