From 47368d5a3901bf424646b04f1b04194b25e1e9ec Mon Sep 17 00:00:00 2001 From: Lawrence Mac Date: Sat, 19 Oct 2024 13:38:56 +0200 Subject: [PATCH 1/2] [DEBUG] Debug test workflow file for secrets --- .github/workflows/build_docs.yml | 3 --- .github/workflows/test.yml | 8 +++++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml index c3c3bb8..8ef8c11 100644 --- a/.github/workflows/build_docs.yml +++ b/.github/workflows/build_docs.yml @@ -4,9 +4,6 @@ on: push: branches: - master - pull_request: - branches: - - master workflow_dispatch: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d5e13a5..2f1b960 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,10 +3,10 @@ name: Test Package on: push: branches: - - main + - master pull_request: branches: - - main + - master workflow_dispatch: @@ -35,4 +35,6 @@ jobs: - name: Run tests env: khaya_api_key: ${{ secrets.KHAYA_API_KEY }} - run: poetry run pytest --cov=khaya \ No newline at end of file + run: | + echo "KHAYA_API_KEY = $khaya_api_key" + poetry run pytest --cov=khaya \ No newline at end of file From 2a0abb63e6ed9afb08c8ac26064646e4ea12e920 Mon Sep 17 00:00:00 2001 From: Lawrence Mac Date: Sat, 19 Oct 2024 13:49:31 +0200 Subject: [PATCH 2/2] [FIX] remove debug feature of poping api_key --- .github/workflows/test.yml | 1 - tests/khaya/conftest.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2f1b960..d3c48a1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,5 +36,4 @@ jobs: env: khaya_api_key: ${{ secrets.KHAYA_API_KEY }} run: | - echo "KHAYA_API_KEY = $khaya_api_key" poetry run pytest --cov=khaya \ No newline at end of file diff --git a/tests/khaya/conftest.py b/tests/khaya/conftest.py index 3a5f7ce..7028eb3 100644 --- a/tests/khaya/conftest.py +++ b/tests/khaya/conftest.py @@ -5,7 +5,7 @@ from khaya.khaya_interface import KhayaInterface -os.environ.pop("khaya_api_key", None) # Remove the key if it exists +# os.environ.pop("khaya_api_key", None) # Remove the key if it exists load_dotenv() khaya_api_key = os.getenv("khaya_api_key", "test")