From f2a2d0c6fa5e887069a700c4b58f180a2a463d97 Mon Sep 17 00:00:00 2001 From: Anuraag Agrawal Date: Fri, 19 Mar 2021 14:41:18 +0900 Subject: [PATCH] Add distribution channel smoke test --- .github/workflows/continuous-monitoring.yml | 19 +++++++++++++++++++ .gitignore | 2 ++ tests/distributioncheck/__init__.py | 0 tests/distributioncheck/test_sanity.py | 5 +++++ tox-distributioncheck.ini | 9 +++++++++ 5 files changed, 35 insertions(+) create mode 100644 .github/workflows/continuous-monitoring.yml create mode 100644 tests/distributioncheck/__init__.py create mode 100644 tests/distributioncheck/test_sanity.py create mode 100644 tox-distributioncheck.ini diff --git a/.github/workflows/continuous-monitoring.yml b/.github/workflows/continuous-monitoring.yml new file mode 100644 index 00000000..a8f60769 --- /dev/null +++ b/.github/workflows/continuous-monitoring.yml @@ -0,0 +1,19 @@ +name: Continuous monitoring of distribution channels +on: + workflow_dispatch: + schedule: + - cron: '0 */6 * * *' + +jobs: + smoke-tests: + name: Run smoke tests + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: '3.x' + - run: pip install tox + - name: Run smoke tests + run: tox -c tox-distributioncheck.ini diff --git a/.gitignore b/.gitignore index efd51b7e..b4e4ffd6 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,5 @@ pip-selfcheck.json .coverage* htmlcov + +venv diff --git a/tests/distributioncheck/__init__.py b/tests/distributioncheck/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/distributioncheck/test_sanity.py b/tests/distributioncheck/test_sanity.py new file mode 100644 index 00000000..398b4fdb --- /dev/null +++ b/tests/distributioncheck/test_sanity.py @@ -0,0 +1,5 @@ +from aws_xray_sdk.core.models.segment import Segment + +def test_create_segment(): + segment = Segment('test') + assert segment.name == 'test' diff --git a/tox-distributioncheck.ini b/tox-distributioncheck.ini new file mode 100644 index 00000000..24176478 --- /dev/null +++ b/tox-distributioncheck.ini @@ -0,0 +1,9 @@ +[tox] +skipsdist = true + +[testenv:distribution-check] +deps = + pytest > 5.2.0 + aws-xray-sdk +commands = + pytest tests/distributioncheck