-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor for flexible general API, pagination and variables support
- Loading branch information
Showing
130 changed files
with
3,083 additions
and
4,614 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,39 @@ | ||
name: Automatic integration e2e test | ||
on: | ||
workflow_run: | ||
workflows: ["Automatic unit tests"] | ||
types: [completed] | ||
jobs: | ||
e2e_test: | ||
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 pytest | ||
- name: Run api fetcher | ||
env: | ||
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 }} | ||
LOGZIO_SHIPPING_TOKEN: ${{ secrets.LOGZIO_SHIPPING_TOKEN }} | ||
run: | | ||
PYTHONPATH=. python3 ./tests/IntegrationTests/test_shipping.py & | ||
echo $! > script_pid.txt | ||
- name: Wait 30s | ||
run: sleep 30 | ||
- name: Kill api fetcher | ||
run: | | ||
kill -9 $(cat script_pid.txt) | ||
rm script_pid.txt | ||
- name: Wait 1m, to allow logs to get processed and indexed in logzio | ||
run: sleep 60 | ||
- name: Check Logzio for logs | ||
env: | ||
LOGZIO_API_TOKEN: ${{ secrets.LOGZIO_API_TOKEN }} | ||
run: PYTHONPATH=. pytest ./tests/IntegrationTests/test_data_arrived.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,29 @@ | ||
name: Build and Push to DockerHub | ||
on: | ||
workflow_dispatch: | ||
release: | ||
types: [published] | ||
jobs: | ||
deploy: | ||
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: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
push: true | ||
platforms: linux/amd64, linux/arm/v7, linux/arm/v8, linux/arm64 | ||
tags: logzio/logzio-api-fetcher:latest, logzio/logzio-api-fetcher:${{ github.event.release.tag_name }} |
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,19 @@ | ||
name: Automatic unit tests | ||
on: [pull_request] | ||
jobs: | ||
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 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.