Skip to content

Commit

Permalink
pass API env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
tcapelle committed Oct 16, 2024
1 parent b47b4a6 commit 30e9d01
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,9 @@ jobs:
WF_CLICKHOUSE_HOST: weave_clickhouse
WEAVE_SERVER_DISABLE_ECOSYSTEM: 1
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: |
nox -e "tests-${{ matrix.python-version-major }}.${{ matrix.python-version-minor }}(shard='${{ matrix.nox-shard }}')"
trace-tests-matrix-check: # This job does nothing and is only used for the branch protection
Expand Down
8 changes: 8 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ def tests(session, shard):
# Add the GOOGLE_API_KEY environment variable for the "google" shard
if shard == "google_ai_studio":
env["GOOGLE_API_KEY"] = session.env.get("GOOGLE_API_KEY")

# we are doing some integration test in test_llm_integrations.py that requires
# setting some environment variables for the LLM providers
if shard == "scorers":
env["GOOGLE_API_KEY"] = session.env.get("GOOGLE_API_KEY")
env["ANTHROPIC_API_KEY"] = session.env.get("ANTHROPIC_API_KEY")
env["MISTRAL_API_KEY"] = session.env.get("MISTRAL_API_KEY")
env["OPENAI_API_KEY"] = session.env.get("OPENAI_API_KEY")

default_test_dirs = [f"integrations/{shard}/"]
test_dirs_dict = {
Expand Down

0 comments on commit 30e9d01

Please sign in to comment.