File tree 1 file changed +32
-0
lines changed
1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 9
9
#
10
10
# If you want to customize it or adapt the checks, just add or remove it from/ to the ACTIONS
11
11
12
+ # Preparation steps run before the first action is executed
13
+ # Typically we clear here the python cache to prevent dirty
14
+ # test results from cached python programs.
15
+ PRE_GLOBAL=(" clear_pycache" )
16
+
17
+ # Postprocessing steps run after the last ACTION has finished
18
+ POST_GLOBAL=()
19
+
20
+ # Preprocessing steps run before each action is executed
21
+ PRE_ACT=()
22
+
23
+ # Postprocessing steps run after each action is executed
24
+ POST_ACT=()
12
25
13
26
ACTIONS=(" cargo build" " cargo build --release" " cargo fmt --all" " cargo clippy --all -- -Dwarnings" " cargo test --all" " cargo run --release -- -m test -v" " cd tests" " pytest" " cd .." )
14
27
15
28
# Usually, there should be no need to adapt the remaining file, when adding or removing actions.
16
29
30
+ # clears the python cache or RustPython
31
+ clear_pycache () { find . -name __pycache__ -type d -exec rm -r {} \; ; }
17
32
18
33
RUSTPYTHONPATH=Lib
19
34
export RUSTPYTHONPATH
20
35
21
36
ACT_RES=0
22
37
FAILS=()
23
38
39
+ for pre in " ${PRE_GLOBAL[@]} " ; do
40
+ $pre
41
+ done
42
+
24
43
for act in " ${ACTIONS[@]} " ; do
44
+
45
+ for pre in " ${PRE_ACTION[@]} " ; do
46
+ $pre
47
+ done
48
+
25
49
$act
26
50
if ! [ $? -eq 0 ]; then
27
51
ACT_RES=1
28
52
FAILS+=(" ${act} " )
29
53
fi
54
+
55
+ for pst in " ${POST_ACTION[@]} " ; do
56
+ $pst
57
+ done
58
+ done
59
+
60
+ for pst in " ${OST_GLOBAL[@]} " ; do
61
+ $pst
30
62
done
31
63
32
64
echo
You can’t perform that action at this time.
0 commit comments