[Refactor] E2E tests stracture #58
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
name: Tests | |
on: [pull_request] | |
jobs: | |
unit-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python 3.12 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
pip install responses | |
pip install pytest | |
pip install pytest-cov | |
- name: Run tests | |
run: PYTHONPATH=. pytest --cov-report term-missing --cov=src tests/UnitTests/test_*.py | |
e2e-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python 3.12 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
pip install docker | |
pip install requests | |
- name: Run E2E tests | |
# Set required environment variables | |
env: | |
LOGZIO_API_TOKEN: ${{ secrets.LOGZIO_API_TOKEN }} | |
DOCKERHUB_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
DOCKERHUB_USER: ${{ secrets.DOCKER_USERNAME }} | |
LOGZIO_SHIPPING_TOKEN: ${{ secrets.LOGZIO_SHIPPING_TOKEN }} | |
AZURE_AD_TENANT_ID: ${{ secrets.AZURE_AD_TENANT_ID }} | |
AZURE_AD_CLIENT_ID: ${{ secrets.AZURE_AD_CLIENT_ID }} | |
AZURE_AD_SECRET_VALUE: ${{ secrets.AZURE_AD_SECRET_VALUE }} | |
run: python -m unittest |