File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2727 steps :
2828 - name : Checkout code
2929 uses : actions/checkout@v4
30+
31+ - name : Set up Python ${{ matrix.python-version }}
32+ uses : actions/setup-python@v4
33+ with :
34+ python-version : 3.12
35+
36+ - name : Install dependencies
37+ run : |
38+ python -m pip install --upgrade pip
39+ pip install uv
40+ uv venv
41+ uv pip install -r requirements.txt -r tests/requirements.txt
Original file line number Diff line number Diff line change 88# eval $(clarifai config env) to source the variables into your shell and run_test.sh afterwards.
99# This allows you to hit different deployments of the Clarifai platform and using your own account.
1010
11+ echo " Creating a new app and keys, so the test run is completely isolated from test runs."
1112# if CLARIFAI_USER_ID does not exist, create it
1213if [ -z " $CLARIFAI_USER_ID " ]; then
1314 # you need to have CLARIFAI_USER_EMAIL and CLARIFAI_USER_PASSWORD set in your environment
3839# First run the linter tests to make sure those pass.
3940uv run pre-commit run --all-files
4041
42+
43+ echo " Running all the tests"
4144# See .github/workflows/run_tests.yml as there are more combinations of tests that can be run but
4245# this should cover the basics.
43- uv run pytest -s --cov=. --cov-report=xml:coverage/coverage.cobertura.xml --ignore=tests/runners/test_model_run_locally-container.py
46+ uv run pytest -s tests/ -v -n auto --durations=5 --timeout=1800 --ignore=tests/runners/test_model_run_locally-container.py
47+
48+
49+ # TODO: cleanup better from these tests capturing the exit code first.
50+ # test_result=$?
51+ # echo "Running single test"
52+ # python3 -m pytest tests/ -vvv -s -k "test_predict_image_url_with_min_value"
53+ # echo "Deleting the created application"
54+ # python3 scripts/app_and_key_for_tests.py --delete-app ${CLARIFAI_APP_ID}
55+ # exit $test_result
You can’t perform that action at this time.
0 commit comments