-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·45 lines (34 loc) · 1020 Bytes
/
test.sh
File metadata and controls
executable file
·45 lines (34 loc) · 1020 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
# Test benchmarks and examples
set -e
cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"/
echo "=== test.sh ==="
echo "- Start Python checks"
echo "- isort: start"
pids=()
for dir in ../hub/apps/*/; do
src_args=$(find "$dir" -maxdepth 1 -type d | sed 's/^/--src /' | tr '\n' ' ')
python -m isort --check-only $dir $src_args --settings-path . &
pids+=($!)
done
for pid in "${pids[@]}"; do
if ! wait "$pid"; then
exit 1 # Fail CI if any `isort` job fails
fi
done
python -m isort --check-only ../benchmarks
echo "- isort: done"
echo "- black: start"
python -m black --check ../benchmarks ../hub
echo "- black: done"
echo "- All Python checks passed"
echo "- Start Markdown checks"
echo "- mdformat: start"
python -m mdformat --check --number ../hub
echo "- mdformat: done"
echo "- All Markdown checks passed"
echo "- Start TOML checks"
echo "- taplo: start"
taplo fmt --check ../benchmarks ../hub
echo "- taplo: done"
echo "- All TOML checks passed"