-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #174 from airtai/173-create-a-new-ci-job-to-test-t…
…he-examples Add GitHub action file to test the examples in CI
- Loading branch information
Showing
26 changed files
with
141 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Test faststream gen examples | ||
on: [workflow_dispatch, pull_request, push] | ||
|
||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.8 | ||
- name: Install Dependencies and library | ||
shell: bash | ||
run: | | ||
set -ux | ||
python -m pip install --upgrade pip | ||
pip install -e ".[dev]" | ||
- name: Run pytest | ||
shell: bash | ||
run: | | ||
scripts/test.sh | ||
scripts/test.sh docs_src/tutorial/calculate-mean-app/tests/test_application.py | ||
scripts/test.sh docs_src/tutorial/retrieve-publish-crypto/tests/test_application.py | ||
scripts/test.sh docs_src/app_index_example/test.py | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "0.1.7rc0" | ||
__version__ = "0.1.7rc1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[pytest] | ||
minversion = 7.0 | ||
addopts = -ra -q | ||
testpaths = | ||
search/tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
|
||
coverage run -m pytest -x --ff "$@" || \ | ||
coverage run -m pytest -x --ff "$@" || \ | ||
coverage run -m pytest -x --ff "$@" |
File renamed without changes.
Empty file.
5 changes: 5 additions & 0 deletions
5
search/tests/examples/test_example_consume_publish_with_key.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from search.examples.example_consume_publish_with_key.test_app import ( | ||
test_point_was_incremented, | ||
) | ||
|
||
__all__ = ("test_point_was_incremented",) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from search.examples.example_course_updates.test_app import ( | ||
test_app_with_new_content, | ||
test_app_without_new_content, | ||
) | ||
|
||
__all__ = ("test_app_with_new_content", "test_app_without_new_content") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from search.examples.example_execute_trade.test_app import ( | ||
test_app_with_sell_action, | ||
test_app_without_sell_action, | ||
) | ||
|
||
__all__ = ("test_app_without_sell_action", "test_app_with_sell_action") |
3 changes: 3 additions & 0 deletions
3
search/tests/examples/test_example_forward_to_another_topic.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from search.examples.example_forward_to_another_topic.test_app import test_app | ||
|
||
__all__ = ("test_app",) |
3 changes: 3 additions & 0 deletions
3
search/tests/examples/test_example_forward_to_multiple_topics.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from search.examples.example_forward_to_multiple_topics.test_app import test_app | ||
|
||
__all__ = ("test_app",) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# import pytest | ||
|
||
from search.examples.example_infinity_publishing.test_app import ( | ||
test_message_was_published, | ||
) | ||
__all__ = ("test_message_was_published",) | ||
# pytest.mark.slow(test_message_was_published) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from search.examples.example_investment_updates.test_app import ( | ||
test_invest_grater_amount_than_threshold, | ||
test_invest_smaller_amount_than_threshold, | ||
) | ||
|
||
__all__ = ( | ||
"test_invest_smaller_amount_than_threshold", | ||
"test_invest_grater_amount_than_threshold", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from search.examples.example_new_employee.test_app import test_new_employee | ||
|
||
__all__ = ("test_new_employee",) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from search.examples.example_pets.test_app import test_app | ||
|
||
__all__ = ("test_app",) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from search.examples.example_plants.test_app import ( | ||
test_sell_plant_is_called, | ||
test_still_growing_is_calles, | ||
) | ||
|
||
__all__ = ("test_sell_plant_is_called", "test_still_growing_is_calles") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from search.examples.example_product_reviews.test_app import ( | ||
test_app_where_review_grade_is_grater_then_5, | ||
test_app_where_review_grade_is_less_then_5, | ||
) | ||
|
||
__all__ = ( | ||
"test_app_where_review_grade_is_grater_then_5", | ||
"test_app_where_review_grade_is_less_then_5", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from search.examples.example_publish_with_key.test_app import ( | ||
test_point_was_incremented, | ||
) | ||
|
||
__all__ = ("test_point_was_incremented",) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from search.examples.example_scram256_security.test_app import test_app | ||
|
||
__all__ = ("test_app",) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from search.examples.example_scram512_security.test_app import test_app | ||
|
||
__all__ = ("test_app",) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# import pytest | ||
|
||
from search.examples.example_scrape_weather.test_app import ( | ||
test_message_was_published, | ||
) | ||
|
||
__all__ = ("test_message_was_published",) | ||
|
||
# pytest.mark.slow(test_message_was_published) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from search.examples.example_social_media_post.test_app import ( | ||
test_post_with_just_two_likes, | ||
test_post_with_many_likes, | ||
) | ||
|
||
__all__ = ("test_post_with_just_two_likes", "test_post_with_many_likes") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from search.examples.example_student_query.test_app import ( | ||
test_message_published_to_correct_topic, | ||
) | ||
|
||
__all__ = ("test_message_published_to_correct_topic",) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from search.examples.example_weather_updates.test_app import ( | ||
test_not_published_to_weather_alerts, | ||
test_published_to_weather_alerts, | ||
) | ||
|
||
__all__ = ("test_not_published_to_weather_alerts", "test_published_to_weather_alerts") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters