From 9365e840d1743f6f5b92b70ee7edb59729cfa130 Mon Sep 17 00:00:00 2001 From: Mateusz Stawicki Date: Mon, 28 Oct 2024 09:42:12 +0100 Subject: [PATCH] Refactor GitHub workflow file to include environment variable for OpenRouter API key and update Poetry installation command to add it to PATH --- .github/workflows/test.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 791595c..7d3e074 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,16 +9,19 @@ on: - '.github/workflows/test.yml' # Trigger on changes to the workflow file pull_request: paths: - - 'src/**' # Trigger on changes in the src directory' + - 'src/**' # Trigger on changes in the src directory - 'tests/**' # Trigger on changes in the tests directory - '.github/workflows/test.yml' # Trigger on changes to the workflow file - workflow_dispatch: # Allows manual triggering of the workflow jobs: test: runs-on: ubuntu-latest + # Set environment variables for the job + env: + OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }} + steps: # Checkout the latest code - name: Checkout code @@ -32,7 +35,9 @@ jobs: # Install Poetry - name: Install Poetry - run: curl -sSL https://install.python-poetry.org | python3 - + run: | + curl -sSL https://install.python-poetry.org | python3 - + echo "::add-path::$(python3 -m site --user-base)/bin" # Install dependencies via Poetry - name: Install dependencies