From 6d354e1ad2159bf2265e1b783f1e64c70fedc1f4 Mon Sep 17 00:00:00 2001 From: Ankur Goyal Date: Mon, 30 Sep 2024 13:07:28 -0700 Subject: [PATCH] Add to README --- README.md | 6 +++--- examples/python.yml | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 examples/python.yml diff --git a/README.md b/README.md index b5c0504..6ba064f 100644 --- a/README.md +++ b/README.md @@ -75,14 +75,14 @@ jobs: root: my_eval_dir ``` -> [!IMPORTANT] -> You must specify `permissions` for the action to leave comments on your PR. -> Without these permissions, you'll see Github API errors. +> [!IMPORTANT] You must specify `permissions` for the action to leave comments +> on your PR. Without these permissions, you'll see Github API errors. To see examples of fully configured templates, see the `examples` directory: - [`node with npm`](examples/npm.yml) - [`node with pnpm`](examples/pnpm.yml) +- [`python`](examples/python.yml) ## How it works diff --git a/examples/python.yml b/examples/python.yml new file mode 100644 index 0000000..a6fc6a8 --- /dev/null +++ b/examples/python.yml @@ -0,0 +1,41 @@ +name: Run Python evals + +on: + push: + # Uncomment to run only when files in the 'evals' directory change + # - paths: + # - "evals/**" + +permissions: + pull-requests: write + contents: read + +jobs: + eval: + name: Run evals + runs-on: ubuntu-latest + + steps: + - name: Checkout + id: checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.12" # Replace with your Python version + + # Tweak this to a dependency manager of your choice + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r test-eval-py/requirements.txt + + - name: Run Evals + uses: ./ + with: + api_key: ${{ secrets.BRAINTRUST_API_KEY }} + runtime: python + root: my_eval_dir