Skip to content

Commit dca0457

Browse files
committed
Extract completion tests as a separate CI job
1 parent bb073ce commit dca0457

File tree

3 files changed

+28
-20
lines changed

3 files changed

+28
-20
lines changed

.circleci/config.yml

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,26 +39,13 @@ jobs:
3939
command: |
4040
set -x
4141
python --version
42-
4342
pip3 install tox
4443
45-
# For completion tests
46-
47-
# `add-apt-repository` was getting stuck on CI for some reason
48-
echo 'deb https://ppa.launchpadcontent.net/fish-shell/release-3/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list
49-
echo 'deb-src https://ppa.launchpadcontent.net/fish-shell/release-3/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list
50-
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 59FDA1CE1B84B3FAD89366C027557F056DC33CA5
51-
sudo apt-get update
52-
sudo apt-get install fish
53-
fish --version
54-
55-
sudo apt-get install zsh
56-
5744
# For enforce-shell-scripts-pass-shellcheck.sh
5845
sudo apt-get install shellcheck
5946
6047
# For enforce-links-correct.sh
61-
npm install --global remark-cli remark-lint-no-dead-urls remark-validate-links
48+
npm install --global remark-cli remark-validate-links
6249
- run:
6350
name: Perform general checks
6451
command: ci/checks/run-all-checks.sh
@@ -71,6 +58,28 @@ jobs:
7158
- store_artifacts:
7259
path: docs/html/
7360
destination: docs
61+
62+
"completion tests":
63+
executor: ubuntu_executor
64+
steps:
65+
- checkout
66+
- run:
67+
name: Install dependencies
68+
# language=sh
69+
command: |
70+
set -x
71+
python --version
72+
pip3 install tox
73+
74+
# `add-apt-repository` was getting stuck on CI for some reason
75+
echo 'deb https://ppa.launchpadcontent.net/fish-shell/release-3/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list
76+
echo 'deb-src https://ppa.launchpadcontent.net/fish-shell/release-3/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list
77+
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 59FDA1CE1B84B3FAD89366C027557F056DC33CA5
78+
sudo apt-get update
79+
sudo apt-get install fish
80+
fish --version
81+
82+
sudo apt-get install zsh
7483
- run:
7584
name: Test shell completions
7685
command: tox -e test-completions -- -vv
@@ -283,6 +292,7 @@ jobs:
283292
# they're just to introduce reusable anchors to be referenced further down the line.
284293
test_jobs: &test_jobs
285294
- general checks
295+
- completion tests
286296
- python 3_6 git 1_8_0
287297
- python 3_7 git 2_7_6
288298
- python 3_8 git 2_25_0
@@ -312,6 +322,7 @@ workflows:
312322
build:
313323
jobs:
314324
- general checks
325+
- completion tests
315326
- python 3_6 git 1_8_0
316327
- python 3_7 git 2_7_6
317328
- python 3_8 git 2_25_0

ci/checks/enforce-links-correct.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,3 @@
33
set -e -o pipefail -u
44

55
remark . --ignore-path=.gitignore --use=remark-validate-links --frail
6-
# The check for dead URLs has a relatively low importance, and turned out to be very flaky.
7-
# Let's make it non-blocking.
8-
remark . --ignore-path=.gitignore --use=remark-lint-no-dead-urls

ci/checks/run-all-checks.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ enforce-consistent-style-for-gitlab.sh
1616
enforce-correct-shebangs.sh
1717
enforce-indent-two-spaces-outside-python.sh
1818
enforce-issue-number-for-todos.sh
19-
if [[ $0 != *.git/hooks/pre-commit ]]; then
20-
# This one needs to connect to the linked websites and can potentially run long,
21-
# let's skip it when this script is executed as git pre-commit hook.
19+
if [[ $CI ]] || command -v remark; then
2220
enforce-links-correct.sh
21+
else
22+
echo 'Warning: remark CLI not installed, link check will be skipped. Use `npm install remark-cli remark-validate-links`'
2323
fi
2424
enforce-mocking-only-whitelisted-methods.sh
2525
enforce-newline-at-eof.sh

0 commit comments

Comments
 (0)