From 0292d1b8c07ccdc9d1c76e0f9700473aa1f419cf Mon Sep 17 00:00:00 2001 From: FatimaZCZ Date: Tue, 12 Dec 2023 12:06:58 +0100 Subject: [PATCH] api test added to actions workflow --- .github/workflows/main.yml | 15 ++------------- requirements.txt | 2 ++ 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6bfe2c8..872b29d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,25 +20,14 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - #pip install requests - #pip install http - #pip install pytest - #pip install fastapi.testclient - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: Lint with Ruff - run: | - pip install ruff - ruff --format=github --target-version=py310 . - continue-on-error: true + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Test with pytest run: | coverage run -m pytest ./tests/api_test/ -v -s - - name: Generate Coverage Report - run: | - coverage report -m push_app_to_registry: name: Push APP Docker image to Docker Hub + needs: perform_pytest runs-on: ubuntu-latest steps: - name: 1 Copy repository diff --git a/requirements.txt b/requirements.txt index 6041a16..1589423 100644 --- a/requirements.txt +++ b/requirements.txt @@ -47,6 +47,8 @@ pydantic==2.5.2 pydantic_core==2.14.5 pyparsing==3.1.1 pytest==7.4.3 +pytest-html==4.1.1 +pytest-metadata==3.0.0 python-dateutil==2.8.2 python-dotenv==1.0.0 python-multipart==0.0.6