Skip to content

Commit

Permalink
v0.2.0
Browse files Browse the repository at this point in the history
Refactor for flexible general API, pagination and variables support
  • Loading branch information
8naama authored Jul 8, 2024
2 parents 4a8bdec + 07e2895 commit 811fb44
Show file tree
Hide file tree
Showing 130 changed files with 3,083 additions and 4,614 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/integrationTest.yaml
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
29 changes: 29 additions & 0 deletions .github/workflows/release.yaml
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 }}
19 changes: 19 additions & 0 deletions .github/workflows/unitTests.yaml
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
64 changes: 0 additions & 64 deletions .github/workflows/workflow.yaml

This file was deleted.

132 changes: 0 additions & 132 deletions .gitignore

This file was deleted.

Loading

0 comments on commit 811fb44

Please sign in to comment.