diff --git a/.github/workflows/test_04_malicious_prompts_rag_and_cot_meta_llama_3_2_3b_instruct.base.yml b/.github/workflows/test_04_malicious_prompts_rag_and_cot_meta_llama_3_2_3b_instruct.base.yml index 8420c7437..704c47cad 100644 --- a/.github/workflows/test_04_malicious_prompts_rag_and_cot_meta_llama_3_2_3b_instruct.base.yml +++ b/.github/workflows/test_04_malicious_prompts_rag_and_cot_meta_llama_3_2_3b_instruct.base.yml @@ -19,6 +19,7 @@ on: jobs: test: uses: ./.github/workflows/test_04.abstract_base.yml + secrets: inherit with: batch_offset: ${{ inputs.batch_offset }} range_name: ${{ inputs.range_name }} diff --git a/tests/conftest.py b/tests/conftest.py index 7ecc78fd8..2bdc6606b 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -70,6 +70,14 @@ def pytest_deselected(items): @pytest.fixture(scope="session", autouse=True) def setup_test_environment(): """Setup run before every test automatically.""" + + if "HF_TOKEN" in os.environ: + hf_token = os.environ.get("HF_TOKEN", "").strip() + if not hf_token: + raise ValueError("conftest.py: HF_TOKEN environment variable is empty or not found") + else: + raise ValueError("conftest.py: HF_TOKEN environment variable not found") + # Set test environment variables os.environ["TESTING"] = "true" os.environ["LOG_LEVEL"] = "DEBUG"