From 3a069f1ca13393ba368acccffbb185e310ef1a37 Mon Sep 17 00:00:00 2001 From: e <6410762+e-mit@users.noreply.github.com> Date: Wed, 26 Jun 2024 03:45:58 +0100 Subject: [PATCH] Fix coverage and tests workflows --- .github/workflows/coverage.yml | 4 ++-- .github/workflows/tests.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index f65a5ff..0c69a33 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -18,8 +18,6 @@ jobs: - name: Run dynamoDB test container run: | export DB_TABLE_NAME=testTable - export TEST=true - export QUERY_LAMBDA_ARN=test docker run --rm --name dynamodb_test_local -d -p 8000:8000 amazon/dynamodb-local sleep 5 ./create_test_db_table.sh @@ -28,6 +26,8 @@ jobs: export DB_TABLE_NAME=testTable export TEST=true export QUERY_LAMBDA_ARN=test + export API_STAGE_NAME=v1 + source auth_dev.sh target_coverage_pc=80 coverage_pc=$(python -m pytest --cov=. tests -p no:cacheprovider | awk '$1 == "TOTAL" {print $NF+0}') echo Test coverage = $coverage_pc% diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2a97c91..63b584b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,8 +18,6 @@ jobs: - name: Run dynamoDB test container run: | export DB_TABLE_NAME=testTable - export TEST=true - export QUERY_LAMBDA_ARN=test docker run --rm --name dynamodb_test_local -d -p 8000:8000 amazon/dynamodb-local sleep 5 ./create_test_db_table.sh @@ -28,6 +26,8 @@ jobs: export DB_TABLE_NAME=testTable export TEST=true export QUERY_LAMBDA_ARN=test + export API_STAGE_NAME=v1 + source auth_dev.sh python -m pytest tests -p no:cacheprovider - name: Save result if: always()