-
Notifications
You must be signed in to change notification settings - Fork 133
/
Copy pathtest.sh
executable file
·71 lines (58 loc) · 1.38 KB
/
test.sh
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/bash
set -e -u -o pipefail
echo "running CI task '${TASK}'"
if [[ ${TASK} == "pre-commit" ]]; then
pip install pre-commit
pre-commit run --all-files
exit 0
fi
echo "using venv at '${HOME}/venvs/hamilton-venv/bin/activate'"
source "${HOME}/venvs/hamilton-venv/bin/activate"
if [[ ${TASK} == "async" ]]; then
pip install .
pytest plugin_tests/h_async
exit 0
fi
if [[ ${TASK} == "dask" ]]; then
pip install -e '.[dask]'
pytest plugin_tests/h_dask
exit 0
fi
if [[ ${TASK} == "integrations" ]]; then
pip install -e '.[pandera]'
pip install dask
pytest tests/integrations
exit 0
fi
if [[ ${TASK} == "ray" ]]; then
pip install -e '.[ray]'
pytest plugin_tests/h_ray
exit 0
fi
if [[ ${TASK} == "pyspark" ]]; then
pip install -e '.[pyspark]'
pip install 'numpy<2' 'pyspark[connect]' # downgrade until spark fixes their bug
pytest plugin_tests/h_spark
exit 0
fi
if [[ ${TASK} == "vaex" ]]; then
pip install -e '.[vaex]'
pytest plugin_tests/h_vaex
exit 0
fi
if [[ ${TASK} == "narwhals" ]]; then
pip install -e .
pip install polars pandas narwhals
pytest plugin_tests/h_narwhals
exit 0
fi
if [[ ${TASK} == "tests" ]]; then
pip install .
pytest \
--cov=hamilton \
--ignore tests/integrations \
tests/
exit 0
fi
echo "ERROR: did not recognize TASK '${TASK}'"
exit 1