Skip to content

Commit f8c3643

Browse files
authored
🔨 Maintenance/type checker repo-wide (ITISFoundation#3450)
1 parent aad0d49 commit f8c3643

38 files changed

+253
-109
lines changed

.github/workflows/ci-testing-deploy.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -912,7 +912,10 @@ jobs:
912912
run: ./ci/helpers/show_system_versions.bash
913913
- name: install
914914
run: ./ci/github/unit-testing/postgres-database.bash install
915+
- name: typecheck
916+
run: ./ci/github/unit-testing/postgres-database.bash typecheck
915917
- name: test
918+
if: always()
916919
run: ./ci/github/unit-testing/postgres-database.bash test
917920
- uses: codecov/[email protected]
918921
with:

ci/github/unit-testing/api-server.bash

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ test() {
2424
popd
2525
}
2626

27+
typecheck() {
28+
pushd services/api-server
29+
make mypy
30+
popd
31+
}
32+
2733
# Check if the function exists (bash specific)
2834
if declare -f "$1" >/dev/null; then
2935
# call arguments verbatim

ci/github/unit-testing/api.bash

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#!/bin/bash
22
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
3-
set -o errexit # abort on nonzero exitstatus
4-
set -o nounset # abort on unbound variable
5-
set -o pipefail # don't hide errors within pipes
3+
set -o errexit # abort on nonzero exitstatus
4+
set -o nounset # abort on unbound variable
5+
set -o pipefail # don't hide errors within pipes
66
IFS=$'\n\t'
77

88
install() {
9-
bash ci/helpers/ensure_python_pip.bash
10-
pip3 install --requirement api/tests/requirements.txt
11-
pip list --verbose
9+
bash ci/helpers/ensure_python_pip.bash
10+
pip3 install --requirement api/tests/requirements.txt
11+
pip list --verbose
1212
}
1313

1414
test() {
@@ -23,8 +23,7 @@ test() {
2323
}
2424

2525
# Check if the function exists (bash specific)
26-
if declare -f "$1" > /dev/null
27-
then
26+
if declare -f "$1" >/dev/null; then
2827
# call arguments verbatim
2928
"$@"
3029
else

ci/github/unit-testing/autoscaling.bash

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ test() {
2424
popd
2525
}
2626

27+
typecheck() {
28+
pushd services/autoscaling
29+
make mypy
30+
popd
31+
}
32+
2733
# Check if the function exists (bash specific)
2834
if declare -f "$1" >/dev/null; then
2935
# call arguments verbatim

ci/github/unit-testing/catalog.bash

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ test() {
2424
popd
2525
}
2626

27+
typecheck() {
28+
pushd services/catalog
29+
make mypy
30+
popd
31+
}
32+
2733
# Check if the function exists (bash specific)
2834
if declare -f "$1" >/dev/null; then
2935
# call arguments verbatim

ci/github/unit-testing/dask-sidecar.bash

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ test() {
2424
popd
2525
}
2626

27+
typecheck() {
28+
pushd services/dask-sidecar
29+
make mypy
30+
popd
31+
}
32+
2733
# Check if the function exists (bash specific)
2834
if declare -f "$1" >/dev/null; then
2935
# call arguments verbatim

ci/github/unit-testing/dask-task-models-library.bash

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ test() {
3232
popd
3333
}
3434

35+
typecheck() {
36+
pushd packages/dask-task-models-library
37+
make mypy
38+
popd
39+
}
40+
3541
# Check if the function exists (bash specific)
3642
if declare -f "$1" >/dev/null; then
3743
# call arguments verbatim

ci/github/unit-testing/datcore-adapter.bash

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ test() {
2424
popd
2525
}
2626

27+
typecheck() {
28+
pushd services/datcore-adapter
29+
make mypy
30+
popd
31+
}
32+
2733
# Check if the function exists (bash specific)
2834
if declare -f "$1" >/dev/null; then
2935
# call arguments verbatim

ci/github/unit-testing/director-v2.bash

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ test() {
2727
popd
2828
}
2929

30+
typecheck() {
31+
pushd services/director-v2
32+
make mypy
33+
popd
34+
}
35+
3036
# Check if the function exists (bash specific)
3137
if declare -f "$1" >/dev/null; then
3238
# call arguments verbatim

ci/github/unit-testing/dynamic-sidecar.bash

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ test() {
3232
popd
3333
}
3434

35+
typecheck() {
36+
pushd services/dynamic-sidecar
37+
make mypy
38+
popd
39+
}
40+
3541
# Check if the function exists (bash specific)
3642
if declare -f "$1" >/dev/null; then
3743
# call arguments verbatim

0 commit comments

Comments
 (0)