Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up github actions #8902

Merged
merged 16 commits into from
Mar 20, 2024
Merged

Clean up github actions #8902

merged 16 commits into from
Mar 20, 2024

Conversation

hamishfagg
Copy link
Contributor

@hamishfagg hamishfagg commented Mar 11, 2024

Description

  • Organise testing jobs by when they should be executed. This brings testing in line with, and divides up testing according to our software development lifecycle. All tests have been moved into:
    • test_on_push.yml: to be run whenever new code is pushed to a PR
    • test_on_deploy.yml: to be run whenever code is deployed to an environment (ideally these would be run against the deployed env - currently they are not). This is triggered by the build_deploy_dev and build_deploy_staging workflows and not run directly itself.
  • Uses matrix_include.json to define the matrix of python versions/OSs to run tests on, for all testing jobs.

@hamishfagg hamishfagg changed the title Allow testing multiple python versions Clean up github actions Mar 13, 2024
Comment on lines +50 to +108
- name: Run integration api and flow tests
run: |

if [ "$RUNNER_OS" == "Linux" ]; then

mkdir prometheus_metrics

pytest -vx tests/integration_tests/flows/test_ml_task_queue.py

# MySQL API
echo -e "\n===============test MySQL API===============\n"
pytest -vx tests/integration_tests/flows/test_mysql_api.py

# MySQL binary API
echo -e "\n===============test MySQL binary API===============\n"
pytest -vx -k 'not TestMySqlApi' tests/integration_tests/flows/test_mysql_bin_api.py

# echo -e "\n===============TS predictions===============\n"
pytest -svx tests/integration_tests/flows/test_ts_predictions.py

# HTTP
echo -e "\n===============test HTTP===============\n"
pytest -vx tests/integration_tests/flows/test_http.py

# Company independent
echo -e "\n===============test company independent===============\n"
pytest -vx tests/integration_tests/flows/test_company_independent.py
fi
env:
PROMETHEUS_MULTIPROC_DIR: ./prometheus_metrics
CHECK_FOR_UPDATES: False

- name: Run Learning Hub Tests
run: |
# Currently requires a DB to be running. New testing system is being set up
# echo -e "\n===============MySQL Handler===============\n"
# pytest -svx mindsdb/integrations/handlers/mysql_handler/

# Currently requires a DB to be running. New testing system is being set up
# echo -e "\n===============PostgreSQL Handler===============\n"
# pytest -svx mindsdb/integrations/handlers/postgres_handler/

echo -e "\n===============MariaDB Handler===============\n"
pytest -svx tests/handler_tests/test_mariadb_handler.py

echo -e "\n===============File Handler===============\n"
pytest -svx mindsdb/integrations/handlers/file_handler/

echo -e "\n===============Home Rental Home Prices===============\n"
pytest -vx tests/integration_tests/flows/test_home_rental_prices_tutorial.py

echo -e "\n===============Forecast Quaterly House Sales===============\n"
pytest -vx tests/integration_tests/flows/test_forecast_quaterly_house_tutorial.py

echo -e "\n===============Predict Text Sentiment Wih Huggingface===============\n"
pytest -vx tests/integration_tests/flows/test_predict_text_sentiment_huggingface_tutorial.py

echo -e "\n===============Predict Text Sentiment Wih OpenAI===============\n"
pytest -vx tests/integration_tests/flows/test_predict_text_sentiment_openai_tutorial.py
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick, and feel free to ignore it.
I prefer having the list of tests in a makefile, which I can run before submitting the commit.

Other than that, LGTM.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ive created #8957 to do this later

@hamishfagg hamishfagg merged commit 7a0a4fb into staging Mar 20, 2024
12 checks passed
@hamishfagg hamishfagg deleted the add/matrix_python_tests branch March 20, 2024 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants