Skip to content

Commit 8dcdeff

Browse files
committed
Auto merge of #4703 - lzutao:donot-clone, r=<try>
download archive instead of cloning repo in integration tests changelog: none
2 parents cbedd97 + 83c227e commit 8dcdeff

File tree

1 file changed

+19
-15
lines changed

1 file changed

+19
-15
lines changed

ci/integration-tests.sh

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,28 @@
1+
#!/usr/bin/env bash
12
set -x
3+
4+
if [[ -z "$INTEGRATION" ]]; then
5+
exit 0
6+
fi
7+
28
rm ~/.cargo/bin/cargo-clippy
39
cargo install --force --path .
410

511
echo "Running integration test for crate ${INTEGRATION}"
612

7-
git clone --depth=1 https://github.com/${INTEGRATION}.git checkout
8-
cd checkout
13+
mkdir -p "checkout/$INTEGRATION"
14+
curl -sSL "https://github.com/$INTEGRATION/archive/master.tar.gz" | tar -xzf - -C "checkout/$INTEGRATION"
15+
cd "checkout/$INTEGRATION" || exit 1
916

10-
function check() {
1117
# run clippy on a project, try to be verbose and trigger as many warnings as possible for greater coverage
12-
RUST_BACKTRACE=full cargo clippy --all-targets --all-features -- --cap-lints warn -W clippy::pedantic -W clippy::nursery &> clippy_output
13-
cat clippy_output
14-
! cat clippy_output | grep -q "internal compiler error\|query stack during panic\|E0463"
15-
if [[ $? != 0 ]]; then
16-
return 1
17-
fi
18-
}
18+
RUST_BACKTRACE=full \
19+
cargo clippy \
20+
--all-targets \
21+
--all-features \
22+
-- --cap-lints warn -W clippy::pedantic -W clippy::nursery \
23+
2>& 1 \
24+
| tee clippy_output
1925

20-
case ${INTEGRATION} in
21-
*)
22-
check
23-
;;
24-
esac
26+
if grep -q "internal compiler error\|query stack during panic\|E0463" clippy_output; then
27+
exit 1
28+
fi

0 commit comments

Comments
 (0)