test-python-oldest.sh 887 Bytes
Newer Older
1
2
#!/bin/bash

3
4
set -e -E -u -o pipefail

5
echo "installing lightgbm and its dependencies"
6
pip install \
7
8
9
10
    --prefer-binary \
    --upgrade \
    -r ./.ci/pip-envs/requirements-oldest.txt \
    dist/*.whl
11
12
13
14
15
16
17

echo "installed package versions:"
pip freeze

echo ""
echo "checking that examples run without error"

18
# run a few examples to test that Python-package minimally works
19
20
21
echo ""
echo "--- advanced_example.py ---"
echo ""
22
python ./examples/python-guide/advanced_example.py || exit 1
23
24
25
26

echo ""
echo "--- logistic_regression.py ---"
echo ""
27
python ./examples/python-guide/logistic_regression.py || exit 1
28
29
30
31

echo ""
echo "--- simple_example.py ---"
echo ""
32
python ./examples/python-guide/simple_example.py || exit 1
33
34
35
36

echo ""
echo "--- sklearn_example.py ---"
echo ""
37
python ./examples/python-guide/sklearn_example.py || exit 1
38
39
40

echo ""
echo "done testing on oldest supported Python version"